Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to start program. Path or permissions wrong? in Qt

I have downloaded Qt Mobility Open source project. I had a set of demo apps. And when built it and started the App, I got this error:

Failed to start program. Path or permissions wrong?

Can someone tell me what this problem could be?

UPDATE:

The complete error is:

Starting /Users/xxxxx/Qt/qt-mobility-opensource-src-1.0.2/config.app/Contents/MacOS/config... Failed to start program. Path or permissions wrong?

I have include the ".pro" file contents:

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
like image 856
RK- Avatar asked Oct 14 '10 09:10

RK-


3 Answers

I had the same issue in Windows. I found the answer. You need to check the "Working directory" parameter in "Run Settings" section. I changed it to the same path as my build directory and it worked.

I was running QT as admin.

like image 153
gl3829 Avatar answered Sep 27 '22 17:09

gl3829


My mac didn't have valgrind installed by default so I had to

brew install valgrind

Go back to QT Creator, and in Projects -> Run -> Valgrind Settings

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

Finally due to the bug report here I realized that valgrind 3.13 has a bug and doesn't work, and valgrind 3.12 also doesn't work on macs, and mac os high sierra isn't supported by valgrind. So you're basically out of look until 3.14 comes around.

like image 30
Luke Murray Avatar answered Sep 27 '22 17:09

Luke Murray


I think the problem you are facing here are either the user rights of the executable or a wrong build path.

First, try setting the build path under 'Projects' - 'General' - Build Directory to a correct path.

If that doesn't work, open the terminal, go to the build path and execute ./QtBuildProgram

If that doesn't work, take a look at the user rights ls -a ./QtBuildProgram

Maybe the executable rights are not granted because you are running the Creator in another user mode as the terminal emulator.

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

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

like image 20
mmoment Avatar answered Sep 27 '22 17:09

mmoment