I am using codelite IDE on windows, in that when I was trying to compile socket program,
it shows: warning: ignoring #pragma comment [-Wunknown-pragmas]
for include "WinSock2.h" #pragma comment(lib,"ws2_32.lib")
First, some clarifications: codelite is not a compiler but an IDE It uses toolchains (GNU, VC etc)
So when you are saying that "winsock library is not identified by codelite IDE" you actually means: the compiler warns about #pragma
Since you do not provide additional information here (such as the build log, the compiler you are using, codelite version etc) I will take a guess here and would say that you are mixingg the GNU toolchain with VC headers - try to use the WinAPI that comes with MinGW instead.
Looking at the WinSock2.h that comes with GCC for Windows I see only this pragma:
#pragma GCC system_header
Also, .lib libraries are meant to be used by VC but not by GCC
Eran