Failed to start the program. Is the path or permissions wrong? in Qt

I downloaded the open source Qt Mobility project. I had a set of demo applications. And when it was built and launched the application, I got this error:

Failed to start the program. Way or access rights?

Can someone tell me what this problem could be?

UPDATE:

Full error:

Starting / Users / xxxxx / Qt / qt -mobility-opensource-src-1.0.2 / config.app / Contents / MacOS / config ... Could not start the program. Way or access rights?

I have the contents of the ".pro" file:

TEMPLATE = app TARGET = writemessage QT += gui include(../examples.pri) CONFIG += mobility MOBILITY = messaging INCLUDEPATH += ../../src/messaging HEADERS += \ messagesender.h SOURCES += \ messagesender.cpp\ main.cpp symbian:TARGET.CAPABILITY = NetworkServices \ LocalServices \ ReadUserData \ WriteUserData \ UserEnvironment \ ReadDeviceData \ WriteDeviceData 
+9
qt qt-creator qt-mobility
source share
8 answers

I think the problem you are encountering here is either the user rights of the executable, or the wrong build path.

First, try setting the correct build path under "Projects" - "General" - "Build Directory".

If this does not work, open a terminal, go to the build path and execute ./QtBuildProgram

If this does not work, take a look at the user rights ls -a./QtBuildProgram

Perhaps the rights to the executable file are not granted, because you run Creator in a different user mode as a terminal emulator.

Just to be sure, run sudo chmod u+x QtBuildProgram and then run the program from the command line by typing ./QtBuildProgram

This should also allow you to run the program again from QtCreator.

+3
source share

I had the same problem on windows. I have found the answer. You need to check the "Working Directory" option in the "Launch Options" section. I changed it to the same path as my build directory, and it worked.

I ran QT as admin.

+7
source share

Valgrind was not installed by default on my Mac, so I had to

 brew install valgrind 

Return to QT Creator and to Projects → Run → Valgrind Settings

Point the Valgrind executable to the installed version of brew, which you can find by typing which valgrind on the command line.

Finally, due to the error message here, I realized that Valgrind 3.13 has an error and does not work, and Valgrind 3.12 also does not work on Macs, and Mac OS High Sierra is not supported by Valgrind. So you are mostly out of sight until 3.14 comes.

+4
source share

In my case, it was because I had a 32-bit processor and it created 64-bit executables. I just figured this out, trying to run it from the command line.

0
source share

Check the startup settings and see if the existing exe path exists and a file is created there. If you are using Windows 7 or Windows 8, set the qtcreator executables to "Run as administrator".

0
source share

Check your antivirus settings.

That was my problem.

0
source share

In my case, this error was caused by a space at the beginning of the "Working Directory" path in the "Run" settings.

0
source share

In my case, this was because I was missing from these two lines of code at the top of the project. Make sure you have them without spaces above:

 #! /usr/bin/env python # -*- coding: utf-8 -*- 
-2
source share

All Articles