The process qmake.exe exited with code 2 - first time with Qt and Qt Creator

二次信任 提交于 2020-01-04 07:10:50

问题


Downloaded Qt and Qt Creator. In Qt Creator I can run example programs. Created new project - Qt empty project. Added new cpp-file with code example from Qt site - first one. When I press "Run", "Build" or "Rebuild" I've got this output

01:41:24: Running steps for project First...
01:41:24: Starting: "C:\Qt\4.8.4\bin\qmake.exe" "C:\Documents and Settings\Олексій\Qt Projects\First\First.pro" -r -spec win32-msvc2008 "CONFIG+=declarative_debug"
Cannot find file: c:\Documents and Settings\Олексій\Qt Projects\First\First.pro.
01:41:24: The process "C:\Qt\4.8.4\bin\qmake.exe" exited with code 2.
Error while building/deploying project First (kit: Desktop)
When executing step 'qmake'

But there IS such file, it contains

SOURCES +=  Main.cpp

What is wrong? I didn't google the solution yet


回答1:


NP Hate ;)

With previous versions of Qt I had problems with spaces in project paths (Note that it installs itself to "C:\Qt: and not to "Program Files"). Try to move your project from "Documents and Settings" to some other location and rename "Qt Projects" to for example "Qt_Projects". As far as I remember it was mentioned in the docs to avoid spaces in project paths.

I would also be carefull with Cyrillic characters




回答2:


Probably you must add to .pro file something like LIBS+=..



来源:https://stackoverflow.com/questions/14095889/the-process-qmake-exe-exited-with-code-2-first-time-with-qt-and-qt-creator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!