Date: Sun, 15 Oct 1995 11:42:11 +0200 (IST) From: Eli Zaretskii To: Richard Arbanas Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: DJGPP w/Borland library? On 13 Oct 1995, Richard Arbanas wrote: > I am attempting to compile C code that contains calls to functions > defined in a library called "libdde.lib". This library appears > to be generated w/ Borland Turbo C++. I tried the following > > gcc -o test test.o libdde.lib > > and received the following error: > > libdde.lib: file not recognized: File format not recognized. This one's in the FAQ (available as faq102.zip from the same place you get DJGPP): 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... In some of the recent developments, an Obj-to-COFF converter is now avialable from OULU archive as ftp://x2ftp.oulu.fi/pub/msdos/programming/converters/o2cv05.arj It might or might not help, because it requires the Obj files to be written with flat model in mind, which your library probably isn't.