How to link winsock.lib?

后端 未结 2 761
北海茫月
北海茫月 2020-12-01 23:47

In my C++ class, I use sockets.

I have some errors when linking because, in my opinion, the library winsock.lib is missing.

I included these:



        
相关标签:
2条回答
  • 2020-12-02 00:00

    The lib file of winsock is "ws_32.lib" (or "ws2_32.lib"), please make sure you've added it.

    0 讨论(0)
  • 2020-12-02 00:21

    I am unable to find direct link shows what lib to use, but if you study this, you will find out, that windows sockets 1.1 is supported through WSOCK32.DLL, that mean, possible, that you want WSock32.Lib, instead of Ws2_32.lib for windows socket version 2.

    WSock32.Lib is a part of Windows SDK (I have v6.0A, v7.0A installed, both has this library)

    0 讨论(0)
提交回复
热议问题