program with winsock api, LINK error - Programmers Heaven

Howdy, Stranger!

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

Categories

program with winsock api, LINK error

intint Posts: 22Member
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

  • stoberstober Posts: 9,765Member ✭✭✭
    : 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.
  • intint Posts: 22Member
    but I don't known how to add it, can you tell me please,
    thanks
  • stoberstober Posts: 9,765Member ✭✭✭
    : 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.