What is not translated

Top  Previous  Next

There are some fundamental problems in the conversion of Delphi code to C++ that cannot be solved by an automatic translator. Even constructs that Delphi2Cpp normally handles correctly may fail in complex or deeply nested situations. In some cases Delphi2Cpp generates explicit todo comments where manual completion is required.

 

The conversion to C++Builder code works seamlessly together with the existing adaptation to the Delphi RTL/VCL. However, manual adjustments to helper names may sometimes be necessary. Delphi2Cpp makes little effort to cooperate with own Delphi code. An example demonstrating the use of a Delphi interface is provided here. If you need additional support, please contact me.

 

Some Delphi constructs, which aren't, automatically translated yet are:

 

Inline assembler code in Delphi and C++ almost are identically. Delphi2Cpp therefore doesn't translate these parts.but only copies them.
Several special compiler directives such as {$J+} are not supported
Code that relies on the internal members or memory layout of Delphi types cannot be converted automatically.
Delphi2Cpp always assumes unique names.However, symbols from the operating system or third-party libraries may use different capitalization and therefore cause naming conflicts.
Parameters for destructors are ignored
In Delphi, everything inside a unit is accessible to other code within the same unit. As a compromise, Delphi2Cpp only makes classes friends of each other.
Manual post-processing is required to achieve proper const-correctness.
Multithreading classes and routines are formally translated, but not checked by an expert
Resource strings are treated like normal strings.
In C++, classes containing abstract methods cannot be instantiated.
The effects of the ZEROBASEDSTRING directive are not corrected automatically.
Parts of the Delphi RTL directly access the virtual method table (VMT) of objects. These mechanisms are not reproduced. One important consequence is that form streaming and related mechanisms cannot work exactly like in Delphi.
Delphi2Cpp does not generate fully COM-compliant C++ code. Advanced technologies such as ActiveX or CORBA are also not specifically supported.
For C++Builder, Variant is supported. For other compilers only TVarRec is supported.
At the current stage, Delphi2Cpp does not handle method resolution clauses.
Delphi2Cpp has no solution for reproducing the effects of overridden DefineProperty methods during DFM conversion.
Known limitations exist regarding method pointers
Known limitations exist regarding anonymous methods

 

There are additional language features that can currently only b translated partially.

 

Special problems:

 

https://isocpp.org/wiki/faq/strange-inheritance#calling-virtuals-from-ctors

 

 

       

 

 

 

 

 

 

 



This page belongs to the Delphi2Cpp Documentation

Delphi2Cpp home  Content