解决:Qt中启动错误,msg如下:The process could not be started!

来源:互联网 发布:php存储json 编辑:程序博客网 时间:2024/06/06 07:17

问题描述:

程序无法通过creator运行,一直提示The process could not be started!错误,但直接双击可执行文件可以运行。


方法1:

I managed to fix it by:

erase all make files and debug files and also the .pro file (I had to save the configuration of this .pro) also the ".project"
well i erase almost everything except my ".cpp" and .h" files

then

Use command line : "qmake -project" to recreate the .pro file

and rebuild everthing inside qt creator
which remade all make file and other stuff.

and it is working now. and it is now calling the right directory /debug for the .exe

 

 

方法2:(不一定可行)

解决办法:在程序pro文件中贴入下列代码

debug {
     DESTDIR=./debug
     LIBS += -L./debug
} else:release {
     DESTDIR=./release
     LIBS += -L./release
}

原创粉丝点击