Re: Linking with objects created from c code
- From: "Rudy Velthuis" <newsgroups@xxxxxxxxxxxx>
- Date: Mon, 19 May 2008 10:24:07 +0000 (UTC)
robert.c.macleod@xxxxxxxxx wrote:
Hi,
I'm trying link in an object file generated from c code into a
delphi application using Delphi 2007 with the following directive:
{$L c_unit.obj}
I get the following error: E2045 Bad object file format: 'C:\opi\c
\c_unit.obj'
c_unit.obj generated by command: cl -c c_unit.c
cl is from microsoft visual c/c++ (version 6).
Delphi only links to object files in OMF format, not to ones in the
COFF format VC++ and GNU C++ produce. So use a Borland compiler (see
article linked to below) to compile your C file and it should work.
Much more about this, and some answers can be found here:
"Using C object files in Delphi"
http://rvelthuis.de/articles/articles-cobjs.html
--
Rudy Velthuis http://rvelthuis.de
"Democracy is where you can say what you think even if you don't
think."
.
- References:
- Linking with objects created from c code
- From: robert . c . macleod
- Linking with objects created from c code
- Prev by Date: Re: Linking with objects created from c code
- Next by Date: Re: Linking with objects created from c code
- Previous by thread: Re: Linking with objects created from c code
- Index(es):
Relevant Pages
|