Search code examples
c++qtqt5qmakeqtcore

Qt Project qmake Error on Building


I'm new at Qt. I made a Qt Quick Application. When I try to build project, compiler gives this error:

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.

Solution

  • It seems to be a known and unresolved issue in general:

    qmake should interpret project file encoding as utf-8

    As you can realize in your output, the problem takes place when invoking the qmake executable on the desired project file. Your path seems to be constructed as utf rather than ascii based on this folder entry:

    "Başla"
    

    This is an issue for qmake since it uses QFile, QDir, et al underneath. As you can read that in the bugreport, those are handled as latin 1, not utf. This may be an issue in your scenario.

    The workaround would be probably to change the Başla entry to Basla just like it happens to be for the rest of the path. That would at least make it probably working, and bring also some consistency into your path.