As far as I know, there is no such tool. Using the Agner Fog object converter, the tool Arno refers to, I never managed to convert the Delphi block to COFF.obj, which can be linked to the MSVC program.
I really think it's unrealistic to take the Delphi source code, compile it, and then use the generated object in MSVC. Another direction is quite possible. You can compile C code for an object and associate this object with your Delphi executable. When you do this, you need to resolve any dependencies that the compiled object has.
But to associate a Delphi object with a C / C ++ program, you need some part of the Delphi RTL you are using. And it will be difficult if you are not using any part of Delphi RTL, which seems unlikely.
In your situation, I think your options are:
- Put the code in C or C ++.
- Compile Delphi code into a dynamic library and link it to your C ++ program.
source share