Share common definition between Delphi and C++ projects -
is there elegant way share common symbol definition between delphi , c++ (visual studio) project?
the symbol might defined or not defined depending on circumstances. possible define symbol in both projects, might comment out in 1 project , forget in other (or vice versa).
if possible, i'm guessing symbol need put .h or .inc file , included in both projects.
// delphi {$define common_symbol} //... some_constant = {$ifdef common_symbol} 80 {$else} 40 {$endif}; // c++ #define common_symbol //... #ifdef common_symbol #define some_constant 80 #else #define some_constant 40 #endif
in above code, if common_symbol
defined, some_constant
80, otherwise 40.
here links may help:
- if need convert c++ header files delphi may try jedi api library.
- if need convert delphi sources c++ header files may need create such utility yourself. think delphiast start it.
Comments
Post a Comment