Add a #define in C++ using cmd
I'm trying to automatically build different flavors of my project. I'm using the command line to compile the project. All is working fine but now I want to define a macro in the cml (example : TEST_PROJECT). I tried using the CL environment variable but it doesn't seem to work There is an other way to add options to my project I'm using devenv.exe to com开发者_如何转开发pile devenv.exe project.sln /build thank you
There's /D for cl.exe in Visual C++. However since you already build .sln file you'll be much better off setting the necessary preprocessor symbol in the project properties. You might want to add a separate project configuration for that.
精彩评论