Re: Linking with objects created from c code



robert.c.macleod@xxxxxxxxx schrieb:

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

Object files can come in different formats. Most probably Delphi doesn't support any but the format of its own C++ personality. AFAIK the VC object format never has been supported.

I've heard a rumor, that RAD Studio supports "msbuild", whatever this may be (I'm still using D7). Have a look at your Delphi docs, that tool or feature may do what you want.

DoDi
.



Relevant Pages

  • Re: Linking with objects created from c code
    ... doesn't support any but the format of its own C++ personality. ... linking in different object file formats. ... "I don't want to achieve immortality through my work; ...
    (comp.lang.pascal.delphi.misc)
  • Re: reading photoshop layers
    ... Mike D Sutton wrote: ... > Delphi isn't too bad at all to work with, I use it on a regular basis at work and find it to be somewhere in the middle ... > the docs or in the source code itself that suggested it could decode individual layers, ... but even then a few hours with a hex editor and some version of the format spec. ...
    (microsoft.public.vb.winapi.graphics)
  • Re: reading photoshop layers
    ... Delphi isn't too bad at all to work with, I use it on a regular basis at work and find it to be somewhere in the middle ... the docs or in the source code itself that suggested it could decode individual layers, ... As for parsing the format yourself, the structure is simple enough, each segment can be read ... Private Function FlipWordAs Integer ' Endian swap on Word ...
    (microsoft.public.vb.winapi.graphics)
  • Re: how do you start learning assembly language
    ... relocation information (/FIXED in Windows, ... simpler than the fixups in an object file. ... Most of the time it's better to consider the executable file format ... The OS has to be able to load the executables, of course, but only the ...
    (alt.lang.asm)
  • Re: comp.lang.pascal.delphi.misc miniFAQ (full version)
    ... Why does the debugger show my For loop variable counting down, ... Does Delphi have an equivalent to the VB Split function? ... > the number of decimal places to display - Format and FormatFloat. ... Added a link to Henry Bartlett's Delphi newsgroups page. ...
    (comp.lang.pascal.delphi.misc)