From: Chris M. <nin...@ho...> - 2001-08-16 15:04:21
|
Chris - What is the difference between -l, -L and specifying a lib on the gcc command line? For instance, I have psmsg.lib in a local lib directory. Right now, in order to compile I have to use the following: gcc -o myfile.exe myfile.o ./lib/psmsg.lib Shouldn't I be able to say: gcc -o myfile.exe myfile.o -L./lib -lpsmsg When I try the above, I get a raft of parse errors and warnings from sqltypes.h (one of the #includes that I'm using in my source, I don't think it's specific to that particular .h file, just a symptom of something else). I realize that there are lib<library>.a's, but I am under the impression that an .a file is a collection of .lib files. And I also realize that the fact that I am able to use ./lib/psmsg.lib on the gcc command line is an extension, and a relatively new one from the posts last month concerning the subject on "normally" having to extract information from a .dll and create an ".a" vs just using the ".lib" or the ".dll" on the command line. From reading the documentation, a -l is supposed to specifiy a libary, and a -L is supposed to specify a directory to search for libaries in. So I guess my basic question is on clarifying my understanding of what consitutes a library, because I thought that psmsg.lib was the library for psmsg.dll .... Any thoughts are greatly appreciated. Cheers, Chris ----Original Message Follows---- From: "Chris Hansen" <pop...@so...> To: "ScanMan" <sc...@sc...>, <min...@li...> Subject: RE: [Mingw-users] winsock newbie question Date: Thu, 16 Aug 2001 08:23:48 +0200 You are missing the Winsock import library. Try this instead: gcc -otest.exe test.c -lwsock32 or this, if you're using Winsock2: gcc -otest.exe test.c -lws2_32 Regards Chris _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |