如果出现类似题目这样的一系列报错,则可尝试如此解决:
(原因:缺少lib库,编译找不到相应的lib库)
undefined reference to `recv@16’
undefined reference to ‘send@16’
undefined reference to ‘closesocket@4’
undefined reference to ‘closesocket@4’
undefined reference to ‘WSAStartup@8’
undefined reference to ‘inet_addr@4’
undefined reference to ‘htons@4’
undefined reference to ‘socketel2’
undefined reference to ‘wSACleanup@0’
undefined reference to ‘connect@12’
undefined reference to ‘send@16’
undefined reference to ‘closesocket@4’
undefined reference to ‘WSACleanup@0’
undefined reference to ‘closesocket@4’
undefined reference to ‘WSACleanup@0’
undefined reference to ‘recv@16’
undefined reference to ‘recv@16’
undefined reference to ‘send@16’
undefined reference to ‘closesocket4’
undefined reference to ‘WSACleanup@0’