www.delorie.com/djgpp/faq/converting/objlib.html   search  
I have a set of useful functions in a .obj format, but no source code. Can I use them with my djgpp program?

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?

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?

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...

  prev     webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 1995   by DJ Delorie     Updated Feb 1995  

Please take a moment to fill out this visitor survey
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)