The process qmake.exe exited with code 2 - first t

2019-07-17 07:14发布

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

2条回答
爷的心禁止访问
2楼-- · 2019-07-17 07:57

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

查看更多
Deceive 欺骗
3楼-- · 2019-07-17 08:03

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

查看更多
登录 后发表回答