Re: [Dev-C++] Trouble compiling winsock programs.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Abhijit S. <mu...@gm...> - 2002-12-29 20:00:10
|
Greets, Manoj. > 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. Just because a file is present in the `lib' directory, doesn't mean that it'll be linked in. You need to add it to your the list of libraries the linker must add. Add `-lwsock32' to the linker command-line. Any lib by the name `libfoo.a' in the `lib' directory has to/can be linked in using -lfoo. HTH. ___________________________________________________________ Abhijit Shylanath E-mail: mu...@gm... || ibr...@bi... Web-site: http://mudeth.tripod.com/ |