Conditional compilation with madExcept in cppbuilder

delphi package - automated exception handling

Conditional compilation with madExcept in cppbuilder

Postby eblake » Wed May 31, 2017 4:47 pm

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?
eblake
 
Posts: 3
Joined: Fri Sep 30, 2016 9:36 am

Re: Conditional compilation with madExcept in cppbuilder

Postby madshi » Wed Jun 14, 2017 8:54 am

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


Return to madExcept

Who is online

Users browsing this forum: No registered users and 4 guests