Qt creator won't run app after compiling

2019-07-12 19:06发布

I checked out a Qt project hosted on google code with SVN to a local folder. When I opened it on Qt Creator, it managed to compile the project, but when it tried to run the compiled program, an error message came up on the application output:

The process could not be started!

What is wrong?

标签: qt qt-creator
2条回答
狗以群分
2楼-- · 2019-07-12 19:17

I assume you tried to run it manually and not from the IDE by pressing Ctrl+R, and I assume that it works when you're running it from the IDE. If that's the case, the problem is that the compiled application requires the Qt libraries and the runtime loader can't find them. When deploying the app, you need to copy the Qt libraries it links against to the application folder (on Windows), or you need to copy them to the app directory and launch it via a wrapper script which adds that directory to LD_LIBRARY_PATH (on Linux.)

查看更多
放荡不羁爱自由
3楼-- · 2019-07-12 19:27

I solved this problem by going to projects>run settings and manually specifying the executable. Found this solution by googling, don't know if it's the proper way to fix this.

查看更多
登录 后发表回答