Visual C++ configuration |
Top Previous Next |
Pretranslated C++ code > Delphi RTL/VCL > Visual C++ configuration For Visual C++ projects following options are recommended:
1. set the x64 option in the menu.
2. Additional dependencies may be:
version.lib mpr.lib netapi32.lib Rpcrt4.lib Dbghelp.lib
3. set C++ version to C++17
Normally in Visual C++ the __cplusplus preprocessor macro has a fixed value, but d2c_config uses this value to calculate the used version of C++. Therefore in Visual C++ projects the option:
/Zc:__cplusplus
has to be set in the Additional options pane of the Command Line property page in the properties for C/C++ .
If you are using the big System.Classes, then also set /bigobj, otherwise you get "error C1128". The complete line then looks like:
/Zc:__cplusplus /bigobj
4. If newly translated code is compiled for the first time, it might be useful to disable the warning to "possible loss of data" at type conversions:
C++ -> extended -> deactivate warnings
4244 4267
5. If C++98 code is compiled with Visual C++ you should disable secure warnings
C++ Preprocessor -> preprocessor definitions
_CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS
This is not necessary for C++11, because here the secure commands
strcpy_s strncpy_s wcscpy_s
etc. are defined.
|
This page belongs to the Delphi2Cpp Documentation |
Delphi2Cpp home Content |