无法解析 qmake .pro 文件 [英] qmake .pro file could not be parsed
问题描述
我正在运行 OS X Mavericks 并尝试将 Qt4 应用程序转换为 Qt5.我之前也从未在这台机器上编译过应用程序.我在这台机器上安装了 Qt 5.1.*,它可以很好地解析文件.一旦我切换到我的 Qt 5.2.0 套件并查看运行设置,就会在我的运行配置"下方出现一个警告:无法解析 .pro 文件‘.pro’.".
I'm running OS X Mavericks and trying to convert a Qt4 application to Qt5. I've also never compiled the application on this machine before. I have Qt 5.1.* installed on this machine, which parses the file just fine. As soon as I switch over to my Qt 5.2.0 kit and look at the run settings, underneath my "Run configuration" there's a warning: "The .pro file '.pro' could not be parsed.".
我在 SO 和 qt-project 网站上查看了其他解决方案——没有一个有帮助.我的 Qt 5.2.0 套件是手动添加的套件,因为我是使用 Homebrew 安装的.
I've looked at other solutions on SO and the qt-project website -- none of which have helped. My Qt 5.2.0 kit is a manually-added kit since I installed it using Homebrew.
这是我的设置截图:
注意,如果我在项目目录下运行qmake(/usr/local/opt/qt5/bin/qmake),是不会输出错误的.
Note that if I run qmake (/usr/local/opt/qt5/bin/qmake) in the project directory, no errors are output.
这是我的 .pro 文件:
Here is my .pro file:
QT += core widgets concurrent
TARGET = Up
TEMPLATE = app
CONFIG += c++11
SOURCES += main.cpp\
MainForm.cpp \
AboutForm.cpp \
progressdialog.cpp
HEADERS += MainForm.h \
AboutForm.h \
progressdialog.h
FORMS += MainForm.ui \
AboutForm.ui \
progressdialog.ui
INCLUDEPATH += $$PWD/../FATX/FATX
RESOURCES += \
MainForm.qrc
CONFIG(debug, debug|release) {
macx: LIBS += -L$$PWD/../FATX-BUILD-OSX/debug/ -lFATX
INCLUDEPATH += $$PWD/../FATX-BUILD-OSX/debug
DEPENDPATH += $$PWD/../FATX-BUILD-OSX/debug
macx: PRE_TARGETDEPS += $$PWD/../FATX-BUILD-OSX/debug/libFATX.a
} else {
macx: LIBS += -L$$PWD/../FATX-OSX/release/ -lFATX
INCLUDEPATH += $$PWD/../FATX-BUILD-OSX/release
DEPENDPATH += $$PWD/../FATX-BUILD-OSX/release
macx: PRE_TARGETDEPS += $$PWD/../FATX-OSX/release/libFATX.a
}
cache()
推荐答案
解决方案是将 Qt Creator 更新到 Qt 3.0.0.
The solution was to update Qt Creator to Qt 3.0.0.
这篇关于无法解析 qmake .pro 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!