Q: Linking gcc object files w/ Borland library 
Author Message
 Q: Linking gcc object files w/ Borland library

You will probably have to go one way or the other.
On the bright side, you can get the sources for the Borland Library [They came
 on my CD as I recall].  Anyway, you might recompile needed Borland functions
 with DJGPP that way.

Alternatively, you could recompile your GNU source with Borland.  Either way
 you might have difficulties, because both languages offer non-standard
 extensions.

Yet another possibility is to use something like the CYGNUS GNU compiler to
 create DLL's  You can't use them from DOS, but if your clients have Windows 95
 [shudder] or Windows NT [smile] then that might be a very good way to go.  If
 they are still running straight DOS, perhaps an upgrade is in order.

For questions of this nature, you can probably get the best quality answers in
 a newsgroup focused on your target operating system. Something like
   comp.os.msdos.*  /* just browse along to find what you want */
or
   comp.os.ms-windows.*

You might also try Borland's technical support.

I'm at home, so I say anything I please.



Mon, 03 Apr 2000 03:00:00 GMT  
 Q: Linking gcc object files w/ Borland library

Hi,

we have a large project on DOS entirely written in C with the
GNU C Compiler. But we now find that we can't link
the gcc object files with a library written in Borland C.
Unfortunately we don't have the sources for that specific
library.

The library has the extension .obj, while the GNU object files
have the extension .o. Even if we rename the Borland library from
.obj to .o, we get the link message "File not recognized: File
format not recognized".

What object file format is used on DOS, what is the
name of the object file format that gcc creates, and
how can the two be linked?

Any help would be very much appreciated

Thanx
Michael

-----------------------------------------------------------
Michael Hasan
Oracle Consulting Services
Stuttgart, Germany




Mon, 03 Apr 2000 03:00:00 GMT  
 Q: Linking gcc object files w/ Borland library

Quote:

> Hi,

> we have a large project on DOS entirely written in C with the
> GNU C Compiler. But we now find that we can't link
> the gcc object files with a library written in Borland C.
> Unfortunately we don't have the sources for that specific
> library.

Hi Michael Hasan,

Object file formats ar usually *not* compatible across different
compilers. Not even for the same operating system. Some compiler
manufactorers do try to offer a limited compatibility to other
copilers or systems, but if so, they say so *explicitely*. For
instance Microsoft has established an OBJ file format that is
supported by all Microsoft compilers for DOS and Windows and is
even supported by some other compilers, like Borland.

But you can't take this for granted. Sometimes object files have
the same extensions on different compilers and are nevertheless
*not* compatible. AFAIK GNU-C has not attempted to achieve
compatibility with either Microsoft or Borland.

For more help on DOS programming, you can ask the MS-DOS programming
experts in:

Stephan
(initiator of the campaign against grumpiness in c.l.c)
(currently on a crusade of grumpiness against stupid G Moore posts)



Mon, 03 Apr 2000 03:00:00 GMT  
 Q: Linking gcc object files w/ Borland library

Quote:

> we have a large project on DOS entirely written in C with the
> GNU C Compiler. But we now find that we can't link
> the gcc object files with a library written in Borland C.
> Unfortunately we don't have the sources for that specific
> library.

There is a section on this in the DJGPP FAQ. (Can't give the section
number, this is a University PC not my own box.)  ? Maybe look under
the 16-bit section?  Remember, the library will be 16-bit, but
DJGPP is 32-bit protected mode.

There is no easy solution, but apparently it is possible (with a _lot_
of work).  Haven't tried myself.


--
   Jon Foster.

(1st Year Maths/Computer Science Student)



Mon, 03 Apr 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Makefiles, Libraries, Object files, Header files in TurboC++ (borland)

2. linking FORTRAN object files with C codes using gcc

3. Problems in linking microsoft C 7.0 object file with Borland

4. Borland open/_rtl_open/sopen Qs

5. Libraries to link under Linux's gcc compiler

6. Libraries to link under Linux's gcc compiler

7. linking errors building shared object libs with gcc 2.7.0

8. Can Borland link with a VC++ library?

9. PRB: LNK2005 Errors When Link C Run-Time Libraries Are Linked Before MFC Libraries (Q148652)

10. HELP: Can't link GCC .OBJ files

11. g++ vs gcc compiled object file

12. Linking static library to COM object

 

 
Powered by phpBB® Forum Software