Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] "Failed to start program. Path or permissions wrong?"
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 6.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MrR7
    wrote on last edited by
    #1

    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. :/

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      QMartin
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MrR7
          wrote on last edited by
          #4

          [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.

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            QMartin
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MrR7
                wrote on last edited by
                #7

                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. :)

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hardik
                  wrote on last edited by
                  #8

                  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]

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved