开发者

Add a #define in C++ using cmd

开发者 https://www.devze.com 2023-03-13 16:29 出处:网络
I\'m trying to automatically build different flavors of my project. I\'m using the command line to compile the project.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号