views:

208

answers:

1

I have a Visual studio solution which I need to run using the command line devenv.exe

I need to set the enable C++ exception to SEH and also the linker > System > Subsystem to Console. It will be a console application. Also I need to set a preprocessor flag.

I tried doing

Set CL=/DTEST_NODE;/EHa;/SUBSYSTEM:CONSOLE

Devenv.exe /build "Release|Win32" "C:\Projects\app.sln"

Though it compiled fine, it had not set any flags. What am I doing wrong ? How can I set those flags? Also, is there a limit on the number of flags that can be set ?

+1  A: 

devenv won't respect those flags, it will only see what it sees in the XML file. You need to put the options you want in the .proj or .sln X XML files. Or you need to compile with the CL command instead of devenv.

bmargulies