Jump to content
Sign in to follow this  
dummzeuch

calling C code from Delphi

Recommended Posts

If I remember correctly, C++ Builder can also compile Delphi units and allows C / C++ code to call Delphi code. The other way round is not possible.

I assume that this is still the case?

 

So if I want to call C code, I have to compile that code to an .obj file and link that to the Delphi program, which means that debugging that code requires a C++ Builder project (or some other C compiler + debugger). Correct? (If I don't want to single step through assembler code, that is).

Share this post


Link to post

Compile the code into a dll and link that. Directly linking obj files is possible but it can be tricky. Especially for 64 bit code where the compiler doesn't respect exception table meta data. 

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×