Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Mac OSX cannot find platform plugin cocoa
Forum Updated to NodeBB v4.3 + New Features

Mac OSX cannot find platform plugin cocoa

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 2 Posters 5.9k Views 1 Watching
  • 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.
  • P Offline
    P Offline
    paulmusgrave
    wrote on last edited by
    #1

    Hello,

    I also asked this question on StackOverflow "here":http://stackoverflow.com/questions/19988129/qt5-cannot-find-platform-plugins-mac-os-x , but I'm having a problem deploying on mac. Following "this link":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-mac.html , I went through with otool -L and changed the linker to look for the Qt frameworks in the app bundle, which I'm fairly certain I did correctly, but I get this error:

    This application failed to start because it could not find or load the Qt platform plugin "cocoa".

    I copied libqcocoa.dylib from my Qt install directory into the app bundle in Contents/Platform/Plugins and changed qt.conf to:

    [Paths]
    Plugins = Platform/Plugins

    Is this the wrong place to put libqcocoa? Is that the correct library?

    Thanks in advance! I'm really new to Mac and don't do much programming in general.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Did you run macdeployqt on your bundle ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        paulmusgrave
        wrote on last edited by
        #3

        I tried that initially, and it had the following errors:

        ERROR: Could not find bundle binary for "MyProgram.app/Contents/MacOS/MyProgram" ERROR: "otool: can't open file: (No such file or directory)"

        WARNING:
        WARNING: Could not find any external Qt frameworks to deploy in "MyProgram.app/Contents/MacOS/MyProgram"
        WARNING: Perhaps macdeployqt was already used on "MyProgram.app/Contents/MacOS/MyProgram" ?
        WARNING: If so, you will need to rebuild "MyProgram.app/Contents/MacOS/MyProgram" before trying again. ERROR: Could not find bundle binary for "MyProgram.app/Contents/MacOS/MyProgram"
        ERROR: file copy failed from "/Developer/Applications/Qt/plugins/platforms/libqcocoa.dylib"
        ERROR: to "MyProgram.app/Contents/MacOS/MyProgram/Contents/PlugIns/platforms/libqcocoa.dylib"
        ERROR: file copy failed from "/Developer/Applications/Qt/plugins/printsupport/libcocoaprintersupport.dylib"
        ERROR: to "MyProgram.app/Contents/MacOS/GraphiteMiniEditor/Contents/PlugIns/printsupport/libcocoaprintersupport.dylib"

        And this was the first time I ran macdeployqt on my bundle.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What version of Qt are you using ?
          How did you install it ?
          What version of OS X ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            paulmusgrave
            wrote on last edited by
            #5

            Qt version 5.1.1 compiled from source.
            Mac OS 10.7.4.

            It ran with no problems in QtCreator when it was looking for the files in my Qt Directory, so I wouldn't think it's a problem with my Qt installation. It's only an issue when I link the application to Qt as frameworks in the app bundle.

            1 Reply Last reply
            0
            • P Offline
              P Offline
              paulmusgrave
              wrote on last edited by
              #6

              I ended up reverting to Qt4.8 and it runs now.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                The errors from macdeployqt look strange, are you sure you did you use the correct version ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  paulmusgrave
                  wrote on last edited by
                  #8

                  Correct version of Qt? I only had 5.1.1 installed at the time if that's what you mean. For one thing, my Qt directory is not /Developer/Applications/ which is where it seemed to be looking. Maybe my path was messed up? Regardless, installing 4.8.5 is already done, and it is a workaround.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    That's why I asked, that path made me think of an older (as in several years) Qt install

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    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