Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to translate from C++ to Delphi

Status
Not open for further replies.

engale

Programmer
May 9, 2003
14
CO
Hi,

I want to migrate code from C++ to Delphi 7, objects and source, how can i do this?, or any one know how i can use C objects in Delphi applications...

thanx a lot,

Alejandro.
 
I know you can use C++ Dynamic Link Libraries (DLLs) in Delphi so try finding out more info on that...I'm afraid I don't know a lot about it. I'm not sure if you can use the C++ objects though but you can definitely call routines from a DLL.

Clive [infinity]
Ex nihilo, nihil fit (Out of nothing, nothing comes)
 
I assume with C++ code you do not mean C++ Builder but Visual C++.

If you want to go for Delphi all the way, you have no other choice than to rewrite your existing source C++ source to Delphi.

An in between solution would be to compile your code into obj files and export that in a header file, and link those with your Delphi application.

Then you could use a DLL like suggested but that wouln`t be too flexible a solution.

Maybe another tip is using C++ builder, it compiles your existing C++ and you can write Pascal / Delphi code in it as well :)

Good luck.

Jurrian de Valk
Sereon Technology
 
Borland did supply two DOS utilities 'PasToC' and 'CToPas' with the older 'Turbo' range of compilers, I dont know how useful these would be here.
Steve
 
another way is to make COM objects from your C++ objects and use them in Delphi.

Roderich
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top