Page 1 of 1

Conditional compilation with madExcept in cppbuilder

Posted: Wed May 31, 2017 4:47 pm
by eblake
In Delphi, you can detect whether madExcept is enabled for a project during compilation with:

Code: Select all

{$IFDEF madExcept}
 ...code...
{$ENDIF}
But, the equivalent in CppBuilder (I am using XE8, 32bit target) does not work. I see no entries in the .cbproj file related to madExcept, and no -D option in the call to bcc32 with madEXcept as an option (which is how I would expect to see this implemented).

In other words, this equivalent code does not work with CppBuilder:

Code: Select all

#ifdef madExcept
...code...
#endif
Am I doing something wrong? Is the #ifdef target something different in CppBuilder?

Re: Conditional compilation with madExcept in cppbuilder

Posted: Wed Jun 14, 2017 8:54 am
by madshi
Hmmmm... That's a good question. It's possible that the way the define is set only affects Delphi atm. I'll see if I can make that work for BCB in the next build, too. But I'm not sure if I can...