|
-
June 14th, 2011, 12:21 AM
#1
can i get compilation version to promote by one and use in code in c++
i have meany compilations that each time i done compilation i move it to dyploy dir also i have debug and release versions , im getting lost here . my question is is there any way to promote some global variable by 1 each time im done compiling , maybe also getting the compilation type (debug oe release ) then i like to use this string in code: im using visual studio express 2008
something like :
Code:
std::string ver = VISUAL_STUDIO_MACRO_VERSIONING
if(ver > prev_ver)
{
..do something ..
like print to log
}
-
June 14th, 2011, 12:49 AM
#2
Re: can i get compilation version to promote by one and use in code in c++
you can use _MFC_VER and _DEBUG
examples:
#if _MSC_VER < 1202
//EVC 4.0 complier is cross 1200 - 1202
#else if _MSC_VER >= 1400
//Visual C++ 2005 complier is 1400
#else
//Visual C++ 2005 complier is 1400
#endif
///////////////////////////////////////
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
-
June 14th, 2011, 01:14 AM
#3
Re: can i get compilation version to promote by one and use in code in c++
Thanks , but i dont understand how can i automatically promote it by one each compilation
how it can remember the last number , file ?
-
June 14th, 2011, 01:32 AM
#4
Re: can i get compilation version to promote by one and use in code in c++
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|