Re: [Dev-C++] Trouble compiling winsock programs.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Charles K. <ch...@ke...> - 2002-12-30 00:27:46
|
In the linker options, where one adds libraries, I have this: C:/Dev-Cpp/lib/libws2_32.a for my winsock2 projects ----- Original Message ----- From: "Manoj Sharma" <sha...@ro...> To: "Dev-C++" <dev...@li...> Sent: Sunday, December 29, 2002 7:13 PM Subject: RE: [Dev-C++] Trouble compiling winsock programs. > Hi, > > Thanks for your prompt responses! > > I should have mentioned in my earlier that I did try adding the -lwsock32 > option to the linker command line.I tried it once again though and the > result was the same as before.The undefined reference error to WSAStartup > error still shows up. > > Also I would like to run this a stand alone file (not a project). Any > suggestions? > Thanks in advance once again for your help. > > Regards, > Manoj. > http://manoj_sharma0.tripod.com > > > -----Original Message----- > From: Abhijit Shylanath [mailto:mu...@gm...] > Sent: Sunday, December 29, 2002 2:57 PM > To: Manoj Sharma; Dev-C++ > Subject: Re: [Dev-C++] Trouble compiling winsock programs. > > > 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/ > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > |