www.delorie.com/djgpp/v2faq/faq139.html | search |
| Previous | Next | Up | Top |
Q: I have this ACMELUXE.LIB library of functions which I want to use. I've extracted all the .obj files, but when I try to link them with my program, GCC complains: "File format not recognized". Can't I use these object files?
Q: I've got a bunch of .obj files I want to use. I've ran AR to make a GCC-style .a object library, but got an error message from GCC saying "couldn't read symbols: No symbols". How can I link them with my code?
However, if you are really desperate, one conversion tool you might try is OBJ2BFD. It was written by Robert Hoehne based on the EMXAOUT utility from the emx/gcc package. OBJ2BFD requires the .obj files to be written for the flat-address memory model and will reportedly complain if you feed it with code written for segmented memory models. OBJ2BFD is available from the DJGPP sites.
Another automated conversion tool called OBJ2COFF was written by the SPiRiT team, and it can be used to convert .obj object files and .lib libraries to COFF format, provided that the original .obj files have been written for flat-address memory model.
OBJ2COFF is available via anonymous FTP transfer from the Oulu MSDOS repository. If you have any problems with it or questions about it, send them to its author Rico or to George van Venrooij. Note that the authors of OBJ2COFF have explicitly prohibited commercial use, so you shouldn't use OBJ2COFF for converting commercial object files.
You can also try using LIB32 librarian from Microsoft C8 to convert object files to COFF.
The main problem with these conversion methods is, of course, that most object files you'd want to converted were written for real-mode programs in memory models other than flat, and without extensive modifications would crash your program anyway... (See previous question.)
webmaster donations bookstore | delorie software privacy |
Copyright ⌐ 1998 by Eli Zaretskii | Updated Sep 1998 |
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)