include了头文件还需要库文件 加上这一句再试试 #pragma comment(lib, "ws2_32.lib")shutdown FunctionHeader Declared in Winsock2.h. Library Use Ws2_32.lib. DLL Requires Ws2_32.dll.