program with winsock api, LINK error

Env.: Windows XP, VC.net
Project: Win32 application

I have included the winsock2.h
when I link, vc said that it can't resolve the identifier
WSAStartup

how does it happen?

Comments

  • : Env.: Windows XP, VC.net
    : Project: Win32 application
    :
    : I have included the winsock2.h
    : when I link, vc said that it can't resolve the identifier
    : WSAStartup
    :
    : how does it happen?
    :

    you need to add ws2_32.lib to the project.
  • but I don't known how to add it, can you tell me please,
    thanks
  • : but I don't known how to add it, can you tell me please,
    : thanks
    :

    I don't know a lot about .NET either but my guess is that you use the menu item Project | Add Existing Item, then navigate to the directory that contains the library. On my computer it is here (but yours may be different)

    C:Program FilesMicrosoft Visual Studio .NETVc7PlatformSDKlib


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion