PDA

View Full Version : Failing to start a new Qt program



gabriel-1
28th October 2019, 21:40
Hello.
I'm creating a Qt project and receiving the following error in the Application output when running in the release mode:


Starting /Users/user/projects/build-my_project-Desktop_Qt_5_6_3_clang_64bit2-Debug/my_project ...
Failed to start program. Path or permissions wrong?
/Users/user/projects/build-my_project-Desktop_Qt_5_6_3_clang_64bit2-Debug/my_project exited with code -1
The process failed to start. Either the invoked program "/Users/user/projects/build-my_project-Desktop_Qt_5_6_3_clang_64bit2-Debug/my_project" is missing, or you may have insufficient permissions to invoke the program.

compile output:


Running steps for project my_project...
Configuration unchanged, skipping qmake step.
Starting: "/usr/bin/make" -j4
make: Nothing to be done for `first'.
The process "/usr/bin/make" exited normally.
Elapsed time: 00:00.

The same happens in debug mode.


Current Configurations:
Mac clang_64(Mac OS Sierra, version 10.12.6)
Qt 5.6.3
Qt Creator 4.10.1

How i'm creating the project:

new project -> Qt Widgets Application
build system: qmake
kit selection: Desktop Qt 5.6.3 clang 64bit2


My current project settings:

build settings -> general:
shadow build is checked
build directory: /Users/user/projects/build-my_project-Desktop_Qt_5_6_3_clang_64bit2-Release

run settings -> run:
executable: /Users/user/projects/build-my_project-Desktop_Qt_5_6_3_clang_64bit2-Release/my_project
working directory: /Users/user/projects/build-my_project-Desktop_Qt_5_6_3_clang_64bit2-Release/my_project.app/Contents/MacOS

In the executable field of run settings, my_project doesn't have the .app extension. Could this mean something with the qt not finding my_project?

gabriel-1
29th October 2019, 15:30
However, i am able to run my project directly from: /Users/user/projects/build-my_project-Desktop_Qt_5_6_3_clang_64bit2-Release/my_project.app/Contents/MacOS/my_project, using the terminal

gabriel-1
29th October 2019, 19:25
I was able to run my project by renaming the file "QtProject" in the .config folder, so QtCreator could generate a new "QtProject" file.

The error "Failed to start program. Path or permissions wrong?" no longer occurred.

Maybe there was something wrong with the "QtProject" file, but I have no idea what it was.

helmuthschmitz
16th November 2020, 02:56
gabriel-1, thanks to post your solution. It worked for me too. I was in the same situation of you, and now, thanks to your answer i can run/deploy my project. It curious that researching over internet, you are the only one that proposed the only solution that works. Thanks