Jump to content

Visual C++ Express 2010-How to link?

- - - - -

  • Please log in to reply
4 replies to this topic

#1
hetra

hetra

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 297 posts
  • Location:Australia
  • Programming Language:C, C++, PHP, Python, Delphi/Object Pascal, Assembly
  • Learning:Python, Assembly
Hello all,

In a previous post, I asked for socket resources. I have many now, yet I can't figure out how to link libraries in VC++ Express 2010. I looked in Beej's Guide to Network Programming and in Winsock C++ Socket Programming Part One, yet the options aren't there in the menus to link libraries. Beej's Guide said that Projects>Settings>Link>Objects/Modules yet Settings isn't in the Projects tab. and the video uses Code::Blocks.

Any help would be good.

#2
hetra

hetra

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 297 posts
  • Location:Australia
  • Programming Language:C, C++, PHP, Python, Delphi/Object Pascal, Assembly
  • Learning:Python, Assembly
Never mind, I figured it out...lol

#3
mjaggard

mjaggard

    Newbie

  • Members
  • Pip
  • 2 posts

Hunter100 said:

Never mind, I figured it out...lol

Please don't be so annoying! How did you solve it? I'm googling to resolve the same issue and finding nothing useful.

#4
Ancient Dragon

Ancient Dragon

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 400 posts
There are a couple ways to do it
  • Use a pragma parama comment(lib,"ws2_32.lib")
  • Use menu Projects --> Properties (last item in the list) --> Configuration Properties --> Linker --> Input
    Then on the right side add the libraries in the Additional Dependencies edit control. You may also have to add a new entriy to the Additional Libraries Path located in Linker --> General, but only if the library you want to add is not located within the compiler's install folder.

Visit Grandpa's Forums, a social networking forum, with family-oriented arcade games, blogs, discussion forums, and photo albums.

#5
mjaggard

mjaggard

    Newbie

  • Members
  • Pip
  • 2 posts
I've gone for the first one and it's working nicely. ;-)

I say working nicely, I mean that I've got past that problem and discovered a whole heap more, but at least my program compiles and links to an exe now.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users