简体   繁体   中英

Compile release and debug at the same time for a C++ project

Is it possible to compile release and debug versions at the same time (different tabs) in a C++ project?

I've tried doing this, with both SCons and Ninja, and I had no problems. I worry that something I'm not aware of is happening and there will be downstream problems...

Yes, simultaneous builds using different configurations are done all the time. (Well, perhaps not simultaneous , but certainly one right after the other.) In Visual Studio, there is a built-in command to do this called "Batch Build". Presumably other IDEs have something similar, and certainly MAKE files support building multiple configurations at one go.

The thing to remember is, like Serge said, to keep the output files in separate folders. That should be the default in your build environment or IDE. There is never a reason to mix these up. Keep the Debug and Release output (binaries, symbols, temp files, etc.) separated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM