[SOLVED] "Failed to start program. Path or permissions wrong?"



  • Hey guys.

    A few years ago, I used to do a lot with Qt. For a current project, I decided to use it again, however, I am having some trouble getting the IDE and the compiler running. Before I start describing the problem in detail, here some info:

    I use:
    Mac OS X 10.8.2
    XCode 4.5.2

    And the most recent version of Qt & the creator.

    When I tried to compile the program the first time, I realized, Qt Creator had not even found the installed compiler. Therefore, I had to add the path
    @/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang@
    manually. Additionally, I downloaded cmake and manually entered the path:
    @/Users/<myusername>/Qt/CMake2.8-10.app/Contents/bin/cmake@

    When I tried to compile it again, this time it work. However, when I tried to run it, I received the error message given in the title:
    @Starting /Users/<myusername>/Applications/Qt/Econisis/Build/Econisis.app/Contents/MacOS/Econisis...
    Failed to start program. Path or permissions wrong?
    /Users/<myusername>/Applications/Qt/Econisis/Build/Econisis.app/Contents/MacOS/Econisis exited with code -1@

    I checked the file given, and I realized, that there was actually nothing but a "makefile" in it! Then I used Spotlight to figure it, if the given "Econisis.app" was located anywhere else on the hard drive - it wasn't.

    So, it actually does not even compile it, even though it says it does. Do you guys know what the problem could be? I am really desperate, I cannot figure it out. :/



  • Hi!

    I had the same problem once with one project, but I don't know why... Have you tried to delete every auto-generated file and recompile? I mean, remove every unnecessary file keeping only your .pro and source ones. Then open the project with qt-creator and execute.

    The other solution I am thinking of is a problem with the libraries. If qt-creator did not find the compiler, maybe you need to recompile the libraries with it.

    Does any one of this things work? Hope it goes fine.

    Best regards.


  • Moderators

    Does /Users/<myusername>/Applications/Qt/Econisis/Build/Econisis.app/Contents/MacOS/Econisis exist?

    Is /Users/<myusername>/Applications/Qt/Econisis/Build/Econisis.app/Contents/MacOS/Econisis executable?

    Can you run /Users/<myusername>/Applications/Qt/Econisis/Build/Econisis.app/Contents/MacOS/Econisis from the terminal?



  • [quote author="QMartin" date="1355904446"]I had the same problem once with one project, but I don't know why... Have you tried to delete every auto-generated file and recompile? I mean, remove every unnecessary file keeping only your .pro and source ones. Then open the project with qt-creator and execute.[/quote]
    I tried to do that, but I didn't change anything. :/

    [quote author="Tobias Hunger" date="1355908496"]Does /Users/<myusername>/Applications/Qt/Econisis/Build/Econisis.app/Contents/MacOS/Econisis exist?

    Is /Users/<myusername>/Applications/Qt/Econisis/Build/Econisis.app/Contents/MacOS/Econisis executable?

    Can you run /Users/<myusername>/Applications/Qt/Econisis/Build/Econisis.app/Contents/MacOS/Econisis from the terminal?[/quote]

    As I already wrote in my start post - no, the file is not even created, therefore it's not executable or anything. :( That's my problem.

    Edit: However, "this":http://pastebin.com/jZpmvhWn makefile is created.



  • Hey there.

    So, is it just like it compiles in nanoseconds? Even clearing all your code it still compiles and successes?

    I know it's a tedious stuff... Did you do this "Compile Qt":http://doc.qt.digia.com/qt/install-mac.html ? I haven't done it for MAC, but sure it will be straightforward. It takes 1 - 2 hours (Find something interesting to do ^_^). When finished, make sure qt-creator finds the compiler, if not, go to menu: tools/options->build&run and specify the path to QtVersion, compiler/tool chain (whatever appears) and CMake.

    Then open your project, and try it again.


  • Moderators

    You are working with a CMake project, aren't you?

    Where did you enter the compiler path? Did you set up the compiler in Tools>Options>(IIRC that is actually Qt Creator>Preferences on mac)>Build & Run>Compilers and then used that information in the Kit (a tab next to Compilers)?

    There also is a way to set up the cmake binary to be used right next to the "Compilers" tab.

    If you did not set this up correctly in Creator then the build system is most likely screwed up quite a bit. You should try to rerun cmake after fixing the setup.



  • Okay guys, I got a step further: I followed what you wrote me, but I didn't help or was already done. Therefore, I reinstalled Xcode and the Command Line Tools. Now it actually seems to compile, it now even tells me what source code errors I have made.

    However, it still doesn't run anything, but terminates the program with this error message:

    @Starting /Users/<username>/Applications/Qt/Econisis/Econisis-build-Desktop_Qt_5_0_0_clang_64bit_SDK_Clang-Debug/Econisis.app/Contents/MacOS/Econisis...
    dyld: Library not loaded: /Users/bld.qt/bamboo-agent-home/xml-data/build-dir/DQTC-RELEASE5LGPL-OSX106/PADDING/lib/QtOpenGL.framework/Versions/5/QtOpenGL
    Referenced from: /Users/<username>/Applications/Qt/Econisis/Econisis-build-Desktop_Qt_5_0_0_clang_64bit_SDK_Clang-Debug/Econisis.app/Contents/MacOS/Econisis
    Reason: image not found
    The program has unexpectedly finished.@

    The file Econisis.app now exists, I can run it from the terminal, however it gives me the same error message. Honestly, I have no idea where it gets that path /Users/bld.qt etc. gets from.

    Edit: I figured out that the files it is looking for are located in /Users/<User>/Qt/5.0.0-rc2/clang_64/lib/, where are the settings to give Qt that information? :(

    Edit2: It all works now! I just reinstalled Qt. :)



  • Hello...

    i also have same error..but could not solved it.

    please guide me.

    Regards,
    Hardik

    [quote author="MrR7" date="1355922947"]Okay guys, I got a step further: I followed what you wrote me, but I didn't help or was already done. Therefore, I reinstalled Xcode and the Command Line Tools. Now it actually seems to compile, it now even tells me what source code errors I have made.

    However, it still doesn't run anything, but terminates the program with this error message:

    @Starting /Users/<username>/Applications/Qt/Econisis/Econisis-build-Desktop_Qt_5_0_0_clang_64bit_SDK_Clang-Debug/Econisis.app/Contents/MacOS/Econisis...
    dyld: Library not loaded: /Users/bld.qt/bamboo-agent-home/xml-data/build-dir/DQTC-RELEASE5LGPL-OSX106/PADDING/lib/QtOpenGL.framework/Versions/5/QtOpenGL
    Referenced from: /Users/<username>/Applications/Qt/Econisis/Econisis-build-Desktop_Qt_5_0_0_clang_64bit_SDK_Clang-Debug/Econisis.app/Contents/MacOS/Econisis
    Reason: image not found
    The program has unexpectedly finished.@

    The file Econisis.app now exists, I can run it from the terminal, however it gives me the same error message. Honestly, I have no idea where it gets that path /Users/bld.qt etc. gets from.

    Edit: I figured out that the files it is looking for are located in /Users/<User>/Qt/5.0.0-rc2/clang_64/lib/, where are the settings to give Qt that information? :(

    Edit2: It all works now! I just reinstalled Qt. :)[/quote]

    [quote author="MrR7" date="1355922947"]Okay guys, I got a step further: I followed what you wrote me, but I didn't help or was already done. Therefore, I reinstalled Xcode and the Command Line Tools. Now it actually seems to compile, it now even tells me what source code errors I have made.

    However, it still doesn't run anything, but terminates the program with this error message:

    @Starting /Users/<username>/Applications/Qt/Econisis/Econisis-build-Desktop_Qt_5_0_0_clang_64bit_SDK_Clang-Debug/Econisis.app/Contents/MacOS/Econisis...
    dyld: Library not loaded: /Users/bld.qt/bamboo-agent-home/xml-data/build-dir/DQTC-RELEASE5LGPL-OSX106/PADDING/lib/QtOpenGL.framework/Versions/5/QtOpenGL
    Referenced from: /Users/<username>/Applications/Qt/Econisis/Econisis-build-Desktop_Qt_5_0_0_clang_64bit_SDK_Clang-Debug/Econisis.app/Contents/MacOS/Econisis
    Reason: image not found
    The program has unexpectedly finished.@

    The file Econisis.app now exists, I can run it from the terminal, however it gives me the same error message. Honestly, I have no idea where it gets that path /Users/bld.qt etc. gets from.

    Edit: I figured out that the files it is looking for are located in /Users/<User>/Qt/5.0.0-rc2/clang_64/lib/, where are the settings to give Qt that information? :(

    Edit2: It all works now! I just reinstalled Qt. :)[/quote]


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.