
please wait
|
|
\winsock\main.o main.cpp:(.text+0x24): undefined reference to `__imp_WSAStartup'
#pragma
directive and since directives depend on the compiler, I conclude #pragma comment()
is an VC++ only directive and since Orwell Dev-Cpp is not an VC++ compiler type but rather an MingW based it will not work.#pragma comment(lib, "Ws2_32.lib")
is an way of telling the VC++ compiler to link with library ws2_32.lib so on VC++ it does this, and the code will work but unfortunately since Orwell Dev-Cpp does not have this capability you must perform this task manually by linking Ws2_32.lib to the project. Then it will successfully execute and work!