如何强制 Qt Creator 使用 MinGW 而不是 Visual Studio
我们正在尝试在安装了 MinGW(带有 Qt)和 Visual Studio 的计算机上使用 MinGW 编译一个项目。不幸的是,Qt 创建者默认更喜欢 MSVS,并且看不到它自己的 MinGW (screenshot< /a>)。遗憾的是,这会导致许多晦涩的错误,因为应用程序是使用 MinGW 编写和调试的。有没有办法让Qt Creator使用MinGW而不杀死MSVS?
We're trying to compile a project with MinGW on the machine that has both MinGW (with Qt) and Visual Studio installed. Unfortunately, Qt creator prefers MSVS by default, and doesn't see it's very own MinGW (screenshot). Sadly, this results in a lot of obscure errors, because application was written and debugged with MinGW. Is there way to make Qt Creator to use MinGW without killing MSVS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
安装时,选择自定义安装类型。在QtSDK->开发工具->桌面Qt->Qt-中选择所需编译器的库。屏幕截图:
While installing, choose custom type of installation. Selected libraries for needed compilers in QtSDK->Development Tools->Desktop Qt->Qt-. Screenshot:
你确定你的 Qt sdk 已经安装了 MinGW 吗?您可以使用 Qt 维护应用程序来确保其 MinGW 引擎已安装。
Have you made sure your Qt sdk is installed with its MinGW? You can use the Qt maintainance app to make sure its MinGW engine is installed.
这些库来自哪里? SDK是你自己编译的吗?或者你下载了图书馆吗?
尝试查看 mkspecs 目录中的内容。应该有一个名为“默认”的链接。这链接到正在使用的规范。我想它指向 win32-msvc2008。您可以更改它,但如果它指向该规范,则意味着 Qt 库已使用该规范进行编译(除非后来更改),这意味着您不能将其与 MinGW 一起使用。您应该使用正确的规范编译库或下载正确的包(MinGW 版本)。
Where are those libraries from? Did you compile the SDK yourself? Or did you downloded the libraries?
Try to see what is in the mkspecs directory. There should be a link named 'default'. That links to the specification which is being used. I suppose it is pointing to win32-msvc2008. You can change that but if it is pointing to that specification it means that the Qt libraries have been compiled with that specification (unless it was changed afterwards), which means you cannot use those with MinGW. You should compile the libraries with the correct specification or download the correct package (MinGW version).