使用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
重新編譯,運行即可。