The problem of writing tcp in vs2017: LNK2019 cannot resolve the external symbol __imp__accept@12, which is referenced in the function _main

Insert picture description here
The error that occurs when writing tcp is shown in the figure above.

solution

Add a precompiled directive #pragma comment(lib, "Ws2_32.lib") at the beginning of cpp
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_50188452/article/details/114691387