无法启动程序.路径或权限错误?在 Qt [英] Failed to start program. Path or permissions wrong? in Qt

查看:85
本文介绍了无法启动程序.路径或权限错误?在 Qt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了 Qt Mobility 开源项目.我有一组演示应用程序.当构建它并启动应用程序时,我收到此错误:

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?

更新:

完整的错误是:

开始/Users/xxxxx/Qt/qt-mobility-opensource-src-1.0.2/config.app/Contents/MacOS/config...无法启动程序.路径或权限不对?

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

我已经包含了.pro"文件内容:

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

推荐答案

我认为您在这里面临的问题要么是可执行文件的用户权限,要么是错误的构建路径.

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.

如果不行,打开终端,进入构建路径,执行./QtBuildProgram

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

如果这不起作用,请查看用户权限 ls -a ./QtBuildProgram

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

可能没有授予可执行权限,因为您正在另一个用户模式下作为终端模拟器运行 Creator.

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

为了确定,执行sudo chmod u+x QtBuildProgram,然后通过键入./QtBuildProgram

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

这也应该允许您再次从 QtCreator 运行程序.

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

这篇关于无法启动程序.路径或权限错误?在 Qt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆