Unresolved external symbol LNK2019

后端 未结 3 1163
不思量自难忘°
不思量自难忘° 2020-12-02 21:59

First of all, I know this question is all over this site but I have looked at almost all of them and can\'t seem to find out what is wrong. This is in VS 2012. Thanks.

相关标签:
3条回答
  • 2020-12-02 22:38

    Add runtimeobject.lib to the linker Additional Dependencies (in the project property page, under Linker->Input).

    0 讨论(0)
  • 2020-12-02 22:48

    Another way is that click right in your project in visual studio and go to following path and add "Ws2_32.lib" in that. Linker>Input> Additional Dependencies

    enter image description here

    0 讨论(0)
  • 2020-12-02 23:02

    The problem is you are not linking against the Ws2_32.lib library. To fix this you can add that to your additional dependencies tab of linker/Input settings for your project. Alternatively (as pointed out by SChepurin in the comments) you can add

    #pragma comment(lib, "Ws2_32.lib")
    

    to a source file of your project.

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