Date: Thu, 13 Jul 1995 20:20:55 +0300 From: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) To: m769110 AT btm2x8 DOT mat DOT uni-bayreuth DOT de Subject: Re: Q: How to convert Borland or Microsoft .lib/.obj-files Cc: djgpp AT sun DOT soe DOT clarkson DOT edu > I tried to link my object-file to a Borland .lib-file and always got the > message: file not recognized: File format not recognized. > > Now maybe anyone can help me by either finding a programm, which would convert > those Borland .lib or Microsoft .obj files to a format recognized by > djgpp, or by finding a bfd-library, which would make them readable by 'ld'. This is discussed in the DJGPP FAQ list, section 17.4: 17.4 Q: I have a set of useful functions in a .obj format, but no source code. Can I use them with my DJGPP program? 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 Unix-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? A: Sorry, you can't. The GNU linker called by gcc doesn't understand the format of .obj files which other DOS-based compilers/assemblers emit. Unless you can get the source of those functions and compile them with gcc, you won't be able to use them. (You can also try using LIB32 librarian from Microsoft C8 to convert object files to COFF.) But don't feel too bad about it: most probably, they were written for real-mode programs, and without extensive modifications would have crashed your program anyway... The latest version of the FAQ is available as faq102.zip from the same place you get DJGPP. Or point your Web browser to this URL: http://www.delorie.com/djgpp/faq There is more info in the FAQ about this issue, so if you need this real bad, read Chapter 17 there which is called ``Converting DOS Programs/Libraries to DJGPP''.