[Dev-C++] Trouble compiling winsock programs.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Manoj S. <sha...@ro...> - 2002-12-29 19:14:03
|
Hi, I am trying to compile a simple winsock program using Dev-C++ and get the following error [Linker error] undefined reference to WSAStartup@8. I tried generating my own libwsock32.a library using the wsock32.dll on my system with the help of the dllwrap utility and linking it to my program by copying the generated .a file to the lib directory but the error stayed the same. I also tried using an older version of wsock32.dll (since I have the latest version of the dll) and it may not be compatible with the header files as supplied by Dev-C++. But this gave me the same undefined reference error. As a last resort I tried using the header files supplied by the Microsoft SDK instead of the include directory header files as supplied by Dev-C++. I get a target architecture must be defined error. An attempt to #define _M_IX86 which is the macro that needs to be defined leads to further errors, so I would prefer not to go down that path further. Can anyone suggest what else can be done to get a very simple winsock program to work. I have the XP OS on a Pentium machine. Regards, Manoj. http://manoj_sharma0.tripod.com |