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++. There fore 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++ .

 

 

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 fro C++11, because here the secure commands

 

strcpy_s

strncpy_s

wcscpy_s

 

etc. are defined.

 

 

 

 



This page belongs to the DelphiXE2Cpp11 Documentation

DelphiXE2Cpp11 home  Content