Archived

This topic is now archived and is closed to further replies.

cab

Convert from delphi to c++

Recommended Posts

Yeah I do...to use it, you do this:

1) Stare at delphi code.
2) Say to yourself - "What was I thinking?"
3) Repeat step 2 ten times.
4) Rewrite by hand


Ok, I actually have no idea, sorry =)

Share this post


Link to post
Share on other sites
I don''t know of any automated tools but it should be pretty straightforward to translate by hand. You could use search and replace in a text editor or maybe write a quick tool to do the obvious stuff ( := to =, begin/end to {}, eliminate "then"s) to get started.

If it''s a lot of code and the objective is just to have the functionality in a C++ app, I''d be asking myself if it''s more worthwhile to wrap the Delphi code into a dll to be used by the C++ code.

Share this post


Link to post
Share on other sites
porting straight delphi to c++ is pretty straightforward, since delphi is a little less extensive than c++. however, if your talking about the vcl, you have a bit of work to do.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The Delphi compiler can generate .obj files instead of .dcu units. It may be possible to convert only the interface part of a unit and link the obj file to the c program.

Share this post


Link to post
Share on other sites