delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/18/04:06:31

From: G DOT DegliEsposti AT ads DOT it
To: perfecto AT mail2 DOT nai DOT net (Perry DOT Fecteau AT Republican DOT COM)
cc: djgpp AT delorie DOT com
Message-ID: <C1256608.002A6F17.00@vega.ads.it>
Date: Mon, 18 May 1998 09:57:50 +0200
Subject: Re: silly question about OBJ files
Mime-Version: 1.0




>i assume that a OBJ files compiled from different sources are
>interchangable.  if so, in what cases would this not be true and if
Unfortunately your assumption is not correct. gcc doesn't understand
.obj format used by other dos compilers (and that's not so strange,
since it is also true that MS compilers don't understand .obj format
from Borland or Watcom and vice versa :-)

gcc compiler and linker use the coff format, but this is not the only
cause of incompatibility:

The real problem is caused by .obj generated for 16 bit models while gcc
uses 32 bit flat model.

>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
>      nasm obj files used with djgpp
>      etc and vice versa

If your .obj is in a 32 bit flat mode there are some utility that
can help in some cases. One is called obj2coff and can convert obj and lib
to a coff format that the gcc linker can understand.

You can have a look at section 17 of Eli's FAQs for more information on
this topic (file faq210b.zip in djgpp distribution).

ciao
  Giacomo


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019