如何在 Windows 上使用带有 Visual C++ 编译器的 Qt Creator?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15329065/
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 Qt Creator with Visual C++ compiler on windows?
提问by Robotex
I installed Visual Studio 2008, Qt 4.8 libraries for vs2008 and Qt add in. I can build Qt projects in VS2008. But it's very inconvenient for me. When I open Qt project in Qt creator it can't compile because can't find qmake.
我安装了 Visual Studio 2008、用于 vs2008 和 Qt 插件的 Qt 4.8 库。我可以在 VS2008 中构建 Qt 项目。但是对我来说非常不方便。当我在 Qt Creator 中打开 Qt 项目时,它无法编译,因为找不到 qmake。
So, how to build projects using Qt Creator on windows.
那么,如何在 Windows 上使用 Qt Creator 构建项目。
采纳答案by QT-ITK-VTK-Help
hope this will help its having easy steps with some solution of errors that one may encounter during installation http://qtitkvtkhelp.blogspot.in/2012/11/qt-installation-prerequisite-1.html
希望这将有助于解决安装过程中可能遇到的一些错误的简单步骤 http://qtitkvtkhelp.blogspot.in/2012/11/qt-installation-prerequisite-1.html
回答by Fritz Feuerstein
Use CMake to build your software. With CMake you can:
使用 CMake 构建您的软件。使用 CMake,您可以:
- -Build your project on a continuous integration server
- Compile with different compilers (Microsoft, gcc, clang) to get additional static checking.
- Open the top level CMakeLists.txt with creator as a project file.
- Have CMake create Visual Studio project files.
- - 在持续集成服务器上构建您的项目
- 使用不同的编译器(Microsoft、gcc、clang)进行编译以获得额外的静态检查。
- 使用 creator 作为项目文件打开顶级 CMakeLists.txt。
- 让 CMake 创建 Visual Studio 项目文件。
If you want to fix Creator only: Qt Creator needs to know where your Qt installation is. Choose the green Qt symbol in the settings menu, klick Qt Version and enter the path to qmake. Then Qt Creator should be ready to go.
如果您只想修复 Creator:Qt Creator 需要知道您的 Qt 安装在哪里。在设置菜单中选择绿色的 Qt 符号,点击 Qt 版本并输入 qmake 的路径。那么 Qt Creator 应该准备好了。