Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.