Problem with installation on Mac OS X



  • Hello everybody,

    Not a chile ago I started a cross platform project using c++ and Qt5. I develop on windows using Qt Creator and/or visual studio 2010 and everything work fine, except for the "missing windows platform" which I figured out.
    Now I am trying build it for mac. I installed the latest framework, not with the default directory and not in the path (other projects built with my machine are built with Qt4 and I really don't want to break them...). But everything build fine using Qt Creator. Then I tried to run it and got some linkers errors which I solved using the "install_name_tool" (which is a pain in the a** for a windows guy like me ;) ).
    Then the hell fell under my head with the message :
    "This application failed to start because it could not find or load the Qt platform plugin "cocoa"."

    I searched and got nothing, It may be a problem with the brand new QPA architecture in Qt5, but if I try to use the CocoaIntegrationPlugin, it does not compile saying that "symbol(s) not found for architecture x86_64"

    Anyone got the same problem ??

    Thanks in advance :)


  • Lifetime Qt Champion

    Hi,

    Did you take a look at the "Mac deployment guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-mac.html ?

    It shows the different steps you need to take as well as the use of macdeployqt to get your bundle ready

    Hope it helps



  • well the macdeployqt also have the link problem so I did not try problem, I linked it and shows me all the dylib that it cannot solve: QPrintSupport, QtWidgets, QtGui, QtCore, libqcocoa...

    but thanks I will tried some things :)


  • Lifetime Qt Champion

    That's strange, what version of Qt did you install ?



  • the standard 5.1.1 for MacOsX using clang64



  • I tried to uninstall, reboot, reinstall it in a different path like /Developper/Tools (yeah a windows guy) and it does not work very much. Even if i create a simple project using qt creator, it compile fine and then crashes with:
    "dyld: Library not loaded: /Users/bld.qt/bamboo-agent-home/xml-data/build-dir/DQTC-LGPLRELEASEBUILD510-OSX106/PADDING/lib/QtWidgets.framework/Versions/5/QtWidgets"

    nobody encountered this pb ?? ;(

    next step is rebuilding with gcc...


  • Lifetime Qt Champion

    It looks like there's something wrong with the id in the frameworks. You could try to change them to the path where you installed them



  • well i tried that with my application (copy in Core, Gui and widgets.framework in my app Framework did and using name_tool) and then I got “This application failed to start because it could not find or load the Qt platform plugin “cocoa”.”


  • Lifetime Qt Champion

    You should rather run macdeployqt then, it will also copy the needed plugins in your bundle.

    Just wondering, when does it crash ? When you run it from QtCreator or by doubling clicking on it ?



  • both, it make things easier ;)

    and even macdeployqt had the problems with the library ids, and when i did fixed that it gave me a lot of errors coming from both my libraries and Qt ones


  • Lifetime Qt Champion

    I've reread your first post, did you check that all your files/libs where build int 64bit ?



  • Well, I do not know how to found out, but there is only one installer for Mac so I thought I got the good one...


  • Lifetime Qt Champion

    Using the file command

    Indeed it should be... By the way, which OS X version are you running ?



  • Mac OS X 10.8.5 with XCode 4.8, not the recent 5.0 (if I could dodge some problems I'm happy... )


Log in to reply
 

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