关于qt:qt5.7 qmake; “系统找不到指定的路径。” 是什么意思以及如何解决? 您所在的位置:网站首页 qt系统找不到指定路径 关于qt:qt5.7 qmake; “系统找不到指定的路径。” 是什么意思以及如何解决?

关于qt:qt5.7 qmake; “系统找不到指定的路径。” 是什么意思以及如何解决?

2024-07-06 09:17| 来源: 网络整理| 查看: 265

Qt5.7 / mingw / windows8.1 qmake。 新安装。 当我在项目文件上运行qmake时,我收到上述错误消息,尽管发出了makefile,但它们会生成并且项目可以正常工作(看起来)。

从命令行运行qmake; 这是我添加到PATH的路径:

I:\\Qtmg\\Qt5.7.0\\5.7\\mingw53_32\\bin;i:\\Qtmg\\Qt5.7.0\\Tools\\mingw530_32\\bin;I:\\Qtmg\\Qt5.7.0\\Tools\\QtCreator\\bin

这与配置文件或缓存有关吗? 如果是这样,这些将在哪里。 还有qmake要求的任何其他外部状态。

谢谢。

编辑#1 这是项目文件:

12345678TEMPLATE = app QT += qml quick quickcontrols2 CONFIG += console SOURCES += main.cpp RESOURCES += qml.qrc

编辑2:从QtCreator 4.0.2输出

常规消息选项卡:

12345678The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified.

编译输出选项卡,运行qmake:

123456714:49:57: Running steps for project Q1... 14:49:57: Starting:"I:\\Qtmg\\Qt5.7.0\\5.7\\mingw53_32\\bin\\qmake.exe" I:\\larry\\qt\\q9edit\\Q1.pro -r -spec win32-g++"CONFIG+=debug""CONFIG+=qml_debug" The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. 14:49:57: The process"I:\\Qtmg\\Qt5.7.0\\5.7\\mingw53_32\\bin\\qmake.exe" exited normally. 14:49:57: Elapsed time: 00:00.

编译输出,重建:

1234567891011121314151617181920212223242514:51:32: Running steps for project Q1... 14:51:32: Starting:"I:\\Qtmg\\Qt5.7.0\\Tools\\mingw530_32\\bin\\mingw32-make.exe" clean I:/Qtmg/Qt5.7.0/Tools/mingw530_32/bin/mingw32-make -f Makefile.Debug clean mingw32-make[1]: Entering directory 'I:/larry/qt/q9edit' rm -f debug/qrc_qml.cpp rm -f debug/main.o debug/qrc_qml.o mingw32-make[1]: Leaving directory 'I:/larry/qt/q9edit' I:/Qtmg/Qt5.7.0/Tools/mingw530_32/bin/mingw32-make -f Makefile.Release clean mingw32-make[1]: Entering directory 'I:/larry/qt/q9edit' rm -f release/qrc_qml.cpp rm -f release/main.o release/qrc_qml.o mingw32-make[1]: Leaving directory 'I:/larry/qt/q9edit' 14:51:33: The process"I:\\Qtmg\\Qt5.7.0\\Tools\\mingw530_32\\bin\\mingw32-make.exe" exited normally. 14:51:33: Configuration unchanged, skipping qmake step. 14:51:33: Starting:"I:\\Qtmg\\Qt5.7.0\\Tools\\mingw530_32\\bin\\mingw32-make.exe" I:/Qtmg/Qt5.7.0/Tools/mingw530_32/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory 'I:/larry/qt/q9edit' g++ -c -pipe -fno-keep-inline-dllexport -g -std=gnu++11 -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtQuickControls2 -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtQuick -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtGui -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtANGLE -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtQml -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtNetwork -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtCore -Idebug -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/mkspecs/win32-g++  -o debug/main.o main.cpp 'I:\\Qtmg\\Qt5.7.0\\5.7\\mingw53_32\\bin\ cc.exe' -name qml qml.qrc -o debug/qrc_qml.cpp g++ -c -pipe -fno-keep-inline-dllexport -g -std=gnu++11 -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtQuickControls2 -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtQuick -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtGui -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtANGLE -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtQml -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtNetwork -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/include/QtCore -Idebug -I../../../Qtmg/Qt5.7.0/5.7/mingw53_32/mkspecs/win32-g++  -o debug/qrc_qml.o debug/qrc_qml.cpp g++ -Wl,-subsystem,console -mthreads -o debug/Q1.exe debug/main.o debug/qrc_qml.o  -LI:/Qtmg/Qt5.7.0/5.7/mingw53_32/lib I:/Qtmg/Qt5.7.0/5.7/mingw53_32/lib/libQt5QuickControls2d.a I:/Qtmg/Qt5.7.0/5.7/mingw53_32/lib/libQt5Quickd.a I:/Qtmg/Qt5.7.0/5.7/mingw53_32/lib/libQt5Guid.a I:/Qtmg/Qt5.7.0/5.7/mingw53_32/lib/libQt5Qmld.a I:/Qtmg/Qt5.7.0/5.7/mingw53_32/lib/libQt5Networkd.a I:/Qtmg/Qt5.7.0/5.7/mingw53_32/lib/libQt5Cored.a mingw32-make[1]: Leaving directory 'I:/larry/qt/q9edit' 14:51:34: The process"I:\\Qtmg\\Qt5.7.0\\Tools\\mingw530_32\\bin\\mingw32-make.exe" exited normally. 14:51:34: Elapsed time: 00:02. 相关讨论 该问题也可能取决于您的项目文件。 您应该提供更多信息,例如完整的构建日志。 添加了项目文件。 有日志吗? 会在哪里,谢谢。 在Qt Creator中,底部有一些视图,一个显示可能会发现错误消息的构建问题,另一个视图用于编译器输出(其他视图除外)。 编译器的输出将很有趣。 根据建议添加了输出,

尝试编辑对PATH变量的更改,一次删除一个目录。 在我看来,您正在尝试添加系统上不存在的不必要的路径(由于构建成功,因此没有必要)。

相关讨论 谢谢你的建议。 遵循这个想法,似乎我安装了mingw的另一个副本(在qt路径之后),并且qmake搜索sh.exe,它在此其他安装中找到。 奇怪的是,当qt安装目录中没有这样的二进制文件时,它将搜索sh.exe。 如果我阻止它找到sh.exe,它将生成一个.qmake.stash文件,此后无论路径如何,它都将使用它运行make。 但是,此存储文件均未引用其他mingw。 如果答案是正确的,您能打上这样吗? 谢谢。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有