Conditional compilation with madExcept in cppbuilder

delphi package - automated exception handling
Post Reply
eblake
Posts: 3
Joined: Fri Sep 30, 2016 9:36 am

Conditional compilation with madExcept in cppbuilder

Post 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?
madshi
Site Admin
Posts: 10749
Joined: Sun Mar 21, 2004 5:25 pm

Re: Conditional compilation with madExcept in cppbuilder

Post 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...
Post Reply