Can't link to libws2_32.a

2003-10-22 Thread Takeshi Honda
Hi, I have a problem to compile my socket program. I want to use winsock2.h, but when I compiled my program, I got the following errors. %gcc -lwsock32 -lws2_32 main.cpp main.cpp: undefined reference to [EMAIL PROTECTED]' main.cpp: undefined reference to [EMAIL

Re: Can't link to libws2_32.a

2003-10-22 Thread Brian Ford
On Thu, 23 Oct 2003, Takeshi Honda wrote: I want to use winsock2.h, but when I compiled my program, I got the following errors. %gcc -lwsock32 -lws2_32 main.cpp First off, libraries go after C/C++ files, so: gcc main.cpp -lwsock32 -lws2_32 Secondly, why are you trying to use winsock in