AG
2012-01-20 10:12:11 UTC
Hello,
I have the following short program:
/*------------------test.cpp-----------------------------------*/
int main(int argc, char * argv[])
{
if ( argv[1][0] == 'a' ) return 3;
else return 2;
}
/*-------------------------------------------------------------------
*/
which compiles fine with /NODEFAULTLIB /ENTRY:"main" +default Release
config set up.
If I compile the same program in default Debug config, the return
values of the program are ok (2 or 3 depending on the input).
Why my Release config with /NODEFAULTLIB /ENTRY:"main" does not work ?
I use Visual C++ Express 2010.
A.G.
I have the following short program:
/*------------------test.cpp-----------------------------------*/
int main(int argc, char * argv[])
{
if ( argv[1][0] == 'a' ) return 3;
else return 2;
}
/*-------------------------------------------------------------------
*/
which compiles fine with /NODEFAULTLIB /ENTRY:"main" +default Release
config set up.
test.exe b
echo %ErrorLevel%
2echo %ErrorLevel%
test.exe a
echo %ErrorLevel%
2echo %ErrorLevel%
If I compile the same program in default Debug config, the return
values of the program are ok (2 or 3 depending on the input).
Why my Release config with /NODEFAULTLIB /ENTRY:"main" does not work ?
I use Visual C++ Express 2010.
A.G.