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


    THIS PAGE  COPY FROM WEBSIT. I have the same question , this is my Qt confg.  And i guess this  is  permission problem.

    image

    1

    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

    qt qt-creator qt-mobility

    shareimprove this question

    edited Jan 14 '12 at 2:22

    mmoment
    642719

    asked Oct 14 '10 at 9:54

    Krishnan
    4,9671261130

    Is it Qt Creator? Does it work if launched from command line? Also it could be useful if you posted your .pro file. –  laalto Oct 14 '10 at 12:28

    I did not try launching from command line. I am just learning it. I imported a sample Messaging App that came part of the open source project in to Qt creator and then I got this problem. I have updated my question with .pro file contents. –  Krishnan Oct 14 '10 at 13:00

    add a comment

    4 Answers

    activeoldestvotes

    up vote2down voteaccepted

    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.

    shareimprove this answer

    edited Jan 17 '12 at 18:31

    answered Jan 13 '12 at 22:26

    mmoment
    642719

    add a comment

    up vote2down vote

    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.

    shareimprove this answer

    edited Aug 20 '12 at 18:07

    answered Aug 20 '12 at 16:22

    gl3829
    212

    add a comment

    up vote0down vote

    In my case, it was because I have a 32-bit CPU and it was building 64-bit executables. I only figured this out after trying to run it from the command line though.

    shareimprove this answer

    answered Nov 25 '12 at 1:49

    Skyler
    374112

    add a comment

    up vote0down vote

    Check your run settings and see if the exe path is existing and file is built there. If you are running windows 7 or windows 8, set the qtcreator executable's settings to "Run as administrator".

    shareimprove this answer

    answered Jan 17 '13 at 4:42

    Vikas
    1

    点击projects,选择Run settings,点击run configuration后面的+号;这时Excutable后面会多出一个路径,把当前工程的可执行文件路径加入,就可以执行。

    如果是Linux下,你的用户对程序目录有权限吗,比如写操作的权限?

  • 相关阅读:
    BZOJ1054|HAOI2008移动玩具|广搜
    tarjan算法
    BJOJ2190|SDOI仪仗队|数论
    POJ2975|Nim|博弈论
    POJ1740|A NEW STONE GAME|博弈论
    python 单例模式
    linux 根据服务名称批量杀死进程
    python 任务计划
    python偏函数
    安装scrapy框架
  • 原文地址:https://www.cnblogs.com/yechuang/p/4521728.html
Copyright © 2020-2023  润新知