Board index » cppbuilder » Re: Is there a way to 'see' if the de{*word*81} was compiled and lunk?References: < XXXX@XXXXX.COM >

Re: Is there a way to 'see' if the de{*word*81} was compiled and lunk?References: < XXXX@XXXXX.COM >


2005-09-28 04:44:55 AM
cppbuilder94
Alex Bakaev [TeamB] wrote:
Quote
w h mowery jr wrote:

>Is there a way to 'see'
>from within the program code
>to 'see' if the de{*word*81} was compiled and lunk?
>
Unless you are building a de{*word*81}, then you cannot compile and link it.

If you are asking whether a program is compiled with debug information,
then there is no way to know that.

Unless you code specifically for it and use macro capabilities.

I.E.

#ifdef DEBUG
put code here
#endif

DEBUG will have to be provided as a macro option to the compiler on the
command line, together with the option to generate debug info.

.a
Is there a macro set when I just set the debug option
in project options
in the compiler tab
there are 2 buttons, "full debug" and "release"
is there a macro that can be looked at to see if the "full debug" button was
pushed or the "release" was pushed?
I think maybe you answered that? But I'm not C++ enought to know?
-------------------------------------------------------------------
# ifdef __BORLANDC__
// if Borland "full debug" button was pushed then i want #define DEBUG TRUE
// else i want #define DEBUG FALSE
# else
# define DEBUG FALSE
# endif
 
 

Re:Re: Is there a way to 'see' if the de{*word*81} was compiled and lunk?References: < XXXX@XXXXX.COM >

"w h mowery jr" < XXXX@XXXXX.COM >wrote in message
Quote
Is there a macro set when I just set the debug option
That depends on the version of BCB that you are using. Newer versions
automatically define _DEBUG when you use the "Full Debug" option. Older
versions did not always do that, requiring _DEBUG to be defined manually.
Gambit
 

Re:Re: Is there a way to 'see' if the de{*word*81} was compiled and lunk?References: < XXXX@XXXXX.COM >

Remy Lebeau (TeamB) wrote:
Quote
"w h mowery jr" < XXXX@XXXXX.COM >wrote in message
news:4339aecb$ XXXX@XXXXX.COM ...


>Is there a macro set when I just set the debug option


That depends on the version of BCB that you are using. Newer versions
automatically define _DEBUG when you use the "Full Debug" option. Older
versions did not always do that, requiring _DEBUG to be defined manually.


Gambit


Apparantly my C++ Builder 3.0 is older,
as i am at 52.
Thanks anyhow.
I can at least put it in a __BORLANDC__ check.
#ifdef __BORLANDC__ // CBuilder 3.0 is too old for _DEBUG, ouch.
# define DEBUG TRUE
#endif
 

{smallsort}