Windows C++ IDE 教學 – C++ Socket Programming

Author: Eric  //  Category: Free Teaching

01. 使用 Code::Blocks 寫 Socket Program 的設定

Settings -> Compiler and debugger -> Linker Settings -> Other linker options -> 加上 -lws2_32

02. 使用 Dev C++ 寫 Socket Program 的設定

Tools -> Compiler Options -> 打勾 Add these commands to linker command line -> 加上 -lws2_32

03. 使用 Microsoft Visual C++ 6.0 寫 Socket Program 的設定。// 以下方法擇一即可

a. 程式碼前面加上 #pragma comment(lib, "wsock32.lib")

b. Project -> Settings -> Link -> Object/library modules -> 最後加上 ws2_32.lib

Tags: , , , ,

Leave a Reply