简体   繁体   English

QT Creator使用VC ++编译非QT项目

[英]QT Creator compile Non-QT project with VC++

I'm trying to use VC++ (from Visual Studio 2012) to complile projects from QT Creator 2.8. 我正在尝试使用VC ++(来自Visual Studio 2012)来编译来自QT Creator 2.8的项目。 I try to create Non-QT project in QT Creator 我尝试在QT Creator中创建Non-QT项目 非QT项目创建 I see it says that it would be "CMake build". 我看到它说这将是“ CMake构建”。 After some steps (name of project, version control...) is shows this message: 经过一些步骤(项目名称,版本控制...)后,将显示以下消息:

在此处输入图片说明

I have this kit detected: 我检测到此套件:

在此处输入图片说明

How can I solve this problem? 我怎么解决这个问题? I have a CMake 2.8.11.2 installed. 我安装了CMake 2.8.11.2。 I know that I can use MinGW, but I need both x32 and x64 compilers, as well as C++11 support (, nullptr, auto and so on). 我知道我可以使用MinGW,但是我需要x32和x64编译器,以及C ++ 11支持(,nullptr,auto等)。 I know, that CMake can generate VS's project files for me, but what if i need to compile them rather often? 我知道,CMake可以为我生成VS的项目文件,但是如果我需要经常编译它们怎么办? Creating *.sln and then opening it in VS, and then compilong it for needed platform seems a bit irrational for me. 创建* .sln,然后在VS中打开它,然后针对所需的平台进行编译,这对我来说有点不合理。 Or maybe there is another compiler that suits my needs (x32, x64, C++11)? 或者,也许还有另一个适合我需求的编译器(x32,x64,C ++ 11)?

You can use VC's compiler with cmake projects just fine. 您可以将VC的编译器与cmake项目配合使用。 Use the "NMake Makefiles" generator and build your project by invoking nmake . 使用“ NMake Makefiles”生成器并通过调用nmake构建项目。 A further improvement (at least for large projects) would be to use jom , by using the generator "NMake Makefiles JOM". 进一步的改进(至少对于大型项目而言)是通过使用生成器“ NMake Makefiles JOM”来使用jom

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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