c++ - Qt 项目 qmake 构建时出错

标签 c++ qt qt5 qmake qtcore

我是 Qt 的新人。我做了一个 Qt 快速应用程序。当我尝试构建项目时,编译器给出以下错误:

23:26:42: Running steps for project Basla...
23:26:42: Starting: "C:\Qt\Qt5.2.0\5.2.0\msvc2012_64_opengl\bin\qmake.exe" C:\Users\TaeZ-Stkyoht\Documents\Ders\Qt\Başla\Basla\Basla.pro -r -spec win32-msvc2012 "CONFIG+=debug" "CONFIG+=declarative_debug" "CONFIG+=qml_debug"
Cannot find file: C:\Users\TaeZ-Stkyoht\Documents\Ders\Qt\Başla\Basla\Basla.pro.
23:26:42: The process "C:\Qt\Qt5.2.0\5.2.0\msvc2012_64_opengl\bin\qmake.exe" exited with code 2.
Error while building/deploying project Basla (kit: Desktop Qt 5.2.0 MSVC2012 OpenGL 64bit)
When executing step 'qmake'
23:26:42: Elapsed time: 00:01.

最佳答案

这似乎是一个已知且 Unresolved 问题:

qmake should interpret project file encoding as utf-8

正如您在输出中所意识到的那样,在对所需项目文件调用 qmake 可执行文件时会出现问题。您的路径似乎是基于此文件夹条目构建为 utf 而不是 ascii:

"Başla"

这是 qmake 的一个问题,因为它在下面使用了 QFileQDir 等。正如您在错误报告中看到的那样,它们被处理为 latin 1,而不是 utf。这可能是您的场景中的一个问题。

解决方法可能是将 Başla 条目更改为 Basla,就像路径的其余部分一样。这至少可以让它发挥作用,并为你的道路带来一些一致性。

关于c++ - Qt 项目 qmake 构建时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20808109/

相关文章:

c++ - 无法在自定义QWidget(Qt5)的paintEvent中使用QPainter

c++ - 绘制全屏四边形?

c++ - 尝试关闭 OpenCV 窗口无效

c++ - 读取空间分隔的数据并将其插入适当的容器

c++ - 向 Qt QML Maps 添加标记/位置?

c++ - 交换 QByteArray 中的字节

c++ - 向 QTableWidget 添加水平 slider

c++ - Try/Catch & Throw 无法正常工作

c++ - 将计算列添加到 Qt QSqlQueryModel

c++ - Qt图表,系列不显示