vs 编译时遇到的err LNK2001: unresolved external symbol __imp_ntohs问题

遇到这个问题是因为找不到对应链接的库文件。

__imp_ntohs这个函数windows定义在wsock32.lib中

只需要将其配置到vs中即可

对应项目->Property->Configuration Properties->Linker->Input->Additional Dependencies中加入即可。

vs 编译时遇到的err LNK2001: unresolved external symbol  __imp_ntohs问题

 
喜欢 2
分享