Mail Archives: djgpp/1998/05/18/04:36:21
On Mon, 18 May 1998 perfecto AT mail2 DOT nai DOT net wrote:
> i assume that a OBJ files compiled from different sources are
> interchangable.
This assumption is very wrong. Object files produced by different
compilers are usually NOT compatible, unless they are from the same
vendor. Even if you mix Turbo C with, say, Microsoft C, it doesn't work
in general. You can mix Borland Pascal with Borland C because it is the
same format, and because Borland meant it to work. The same is generally
true about different compilers of the same vendor.
> if so, in what cases would this not be true and if
> so, what conditions must exist to make this true.
>
> e.g. turbo pascal obj files used with djgpp
> turbo c++ obj files used with djgpp
These wil not work. Mixing C++ object files from different compilers is
especially insane, since they mangle the names of functions differently.
> nasm obj files used with djgpp
NASM can produce object files in COFF format, and they can be linked with
DJGPP.
More details about this are available in sections 17.5 and 17.6 of the
DJGPP FAQ list (available as v2/faq210b.zip from the same place you get
DJGPP).
- Raw text -