windows 如何在 C++ 项目中使用 nmake
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7905498/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to use nmake for an C++ project
提问by Sim
How do I set up a project using nmake like with GNU Make?
如何像使用 GNU Make 一样使用 nmake 设置项目?
I got a certain folder structure I want to keep and would love if I could tell cl
to put the obj files in a certain build folder.
我有一个我想保留的特定文件夹结构,如果我能告诉cl
将 obj 文件放在某个构建文件夹中,我会很高兴。
I did not find any tutorial which actually describes a real project setup. I am in desperate need of a short realistic example or a link to a tutorial actually dealing with my problem as thisor thisare not even close to do any real explanation.
我没有找到任何实际描述真实项目设置的教程。我迫切需要一个简短的现实示例或指向实际处理我的问题的教程的链接,因为这个或这个甚至没有接近做任何真正的解释。
回答by arne
If you're willing to try something new, I'd suggest using cmake
to generate the NMake Makefiles for you. This has the additional advantage that you can generate Visual Studio project files, Unix Makefiles etc from the same build system generator.
如果您愿意尝试新事物,我建议您使用cmake
它为您生成 NMake Makefile。这具有额外的优势,您可以从同一个构建系统生成器生成 Visual Studio 项目文件、Unix Makefile 等。