From: "David May" Organization: Albuquerque T-VI To: "Craig Flint" Date: Tue, 21 Jan 1997 14:19:00 -0700 Subject: Re: Libs and dissassembly (again) CC: djgpp AT delorie DOT com Message-ID: > I'm new at DJGPP and I coudln't figure out how to compile libs. As well I > couldn't figure out how to dissassemble an object file (if it is possible > in DJGPP) or view the assembly code that DJGPP produces from a C or C++ > file. > > Any help would be very appreciated. > > Please respond on the news group as I no longer have an e-mail address! > > Thanks in advance, > > G. Flint A library file is an archive of object (.o) files. Do you want to create a library file or use the object files in the library? To create a library, you must generate the .o files using gcc, like so: gcc -o file.o -c file.c for each of your .c source files. Then, use the ar program like so: ar rvc libmylib.a file.o ... Once you've done this, to include these objects in your program, place the .a file in your lib directory (typically, c:\djgpp\lib) and compile your program like so: gcc -o myprog.exe myprog.c -lmylib To view the assembly code that gcc produces use the -S switch, like so: gcc -S mycfile.c You will have a file with an extension of .s in the current directory containing the assembly source. > I posted the above message on January 16, however nobody answered and I > really need an answer so _please_ help me!!!! I realize these questions > mights sound silly to experienced DJGPP users but if you can answer them it > will be very appreciated. Sorry, still playing catch-up. > Thanks Again. De nada! David May, ID Card Administrator Albuquerque TVI