Board index » delphi » Re: to Danny Thorpe

Re: to Danny Thorpe


2005-12-02 03:05:38 AM
delphi118
Rudy Velthuis [TeamB] writes:
Quote
At 17:17:33, 01.12.2005, Thaddy writes:


>Ever tried that with delphi outputting C++ obj before linking as well?


Yes. But Delphi will not link to the .obj file. C++ will, of course.

Or perhaps I misunderstood? Could you be a little more explicit?


Are you suggesting Delphi will output DCU's anyway? And link something
you did not select?
It does not. Change your output directories for a tiny little test.
As long as any of the the externals are resolved (by stubs as I
suggested) our pretty lil' sister will happily link with externally
compiled C++ code as well ;) This is not an option that should go
unnoticed. It actually works. :)
 
 

Re: to Danny Thorpe

At 20:05:38, 01.12.2005, Thaddy writes:
Quote
Rudy Velthuis [TeamB] writes:
>At 17:17:33, 01.12.2005, Thaddy writes:
>
>
>>Ever tried that with delphi outputting C++ obj before linking as
>>well?
>
>
>Yes. But Delphi will not link to the .obj file. C++ will, of course.
>
>Or perhaps I misunderstood? Could you be a little more explicit?
>
>
Are you suggesting Delphi will output DCU's anyway? And link something
you did not select? It does not. Change your output directories for a
tiny little test. As long as any of the the externals are resolved (by
stubs as I suggested) our pretty lil' sister will happily link with
externally compiled C++ code as well ;) This is not an option that
should go unnoticed. It actually works. :)
I never tried that. But the fact that Delphi will link to C++ objects it
produced itself does not mean it links to C++ objects produced by, say,
C++Builder, i.e. containing real C++ code.
--
Rudy Velthuis [TeamB] velthuis.homepage.t-online.de
"The artist is nothing without the gift, but the gift is nothing without
work."
-- Emile Zola (1840-1902)
 

Re: to Danny Thorpe

Quote
I never tried that. But the fact that Delphi will link to C++ objects it
produced itself does not mean it links to C++ objects produced by, say,
C++Builder, i.e. containing real C++ code.

Yes it DOES. Just because the granularity of the C++ libs is so low you
can actually redirect the lowlevel calls in a .hpp file to Delphi and
not use the standard c++ libs. And even the free BC++ 5.5 compiler from
Borland will happily comply to what you want. And objects (old skool)
are the way to map'm against the C++ classes that are plain (i.e.: do
not derive from anything). Key is writing stubs in C++ that provide
access to the delphi runtime through externals, skipping the common
runtime code you would otherwise include, like stdio, etc. And mind the
case sensitivity.
 

Re: to Danny Thorpe

At 20:36:52, 01.12.2005, Thaddy writes:
Quote
>I never tried that. But the fact that Delphi will link to C++ objects
>it produced itself does not mean it links to C++ objects produced by,
>say, C++Builder, i.e. containing real C++ code.
>
Yes it DOES. Just because the granularity of the C++ libs is so low you
can actually redirect the lowlevel calls in a .hpp file to Delphi and
not use the standard c++ libs.
I know that, but I have tried several times, and C++ object files (as
opposed to C object files) did not link (some record seemed to be missing
from the object file). IOW, it is not the missing extranl references, I
know how to solve that. But the object file simply did not link. What did
I do wrong?
Could you give a small example of a C++ object file that could be linked
with the Delphi linker, as long as any external references are satisfied?
I never managed to do it.
--
Rudy Velthuis [TeamB] velthuis.homepage.t-online.de
"He has all the virtues I dislike and none of the vices I admire."
-- Sir Winston Churchill (1874-1965)