Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Release" or "Full debug" 1

Status
Not open for further replies.

hennep

Programmer
Dec 10, 2000
429
I would like to see how a program was compiled, "Release" or "Full debug".
Is there a way to query this from within the executable?
 
You probably have to put in some conditionally compiled stuff that checks for _DEBUG, and adds a string to your /? or Info output. From the helpfile:
<snip>
_DEBUG Defined when in Full Debug mode; not defined in Release mode (options on the Compiler page of the Project |Options). Default is defined.
</snip>
and simplified code could look like this:
Code:
... "version blabla"
#if defined(_DEBUG) // could also be #ifdef _DEBUG
" -Debug"
#endif
"\0";

HTH
TonHu
 
To be clearer, could you please give a exam with a code block, I mean about a small project.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top