使用Dev_C++编译Socket代码时,出现错误undefind reference to '__imp_wsastartup',如下所示
解决方法:选择 Tools -> Compiler Options -> General -> Add the following commands when calling the compiler: 中添加
-lwsock32
重新编译,运行即可。
使用Dev_C++编译Socket代码时,出现错误undefind reference to '__imp_wsastartup',如下所示
解决方法:选择 Tools -> Compiler Options -> General -> Add the following commands when calling the compiler: 中添加
-lwsock32
重新编译,运行即可。