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. Qt 6.4.0 Static Build on OSX fails loading cocoa plugin OSX 12.6
Forum Updated to NodeBB v4.3 + New Features

Qt 6.4.0 Static Build on OSX fails loading cocoa plugin OSX 12.6

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 255 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
    michaelwilson
    wrote on last edited by
    #1

    Hi,

    I needed to do a static build of Qt 6.4 because my app uses custom allocators and de-allocators.

    So I configured Qt as follows:
    ./configure -cmake-generator 'Unix Makefiles' -debug -skip qt3d -skip qtlocation -nomake examples -nomake tests -skip qtwebengine -skip qtwebview -skip qtcharts -skip qtdatavis3d -skip qtwebsockets -skip qthttpserver -skip qtserialport -skip qtquick3d -skip qtquick3dphysics -skip qtremoteobjects -skip qtserialbus -skip qtspeech -skip qttranslations -skip qtvirtualkeyboard -skip qtwebchannel -skip qtwayland -skip qtpositioning -skip qtsensors -no-harfbuzz -skip qtconnectivity -skip qtwebserver -skip qtwebsockets -skip qtlottie -skip qtdoc -skip qt3d -qpa cocoa --prefix=/usr/local/Qt6.4.0 -static

    This worked well, but this fails during execution:

    [qt.qpa.plugin] Could not find the Qt platform plugin "cocoa" in "/usr/local/Qt6.4.0/plugins/platforms/"
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    If I look in /usr/local/Qt6.4.0/plugins/platforms/, I find:

    libqcocoa_debug.a libqcocoa_debug.prl libqminimal_debug.a libqminimal_debug.prl libqoffscreen_debug.a libqoffscreen_debug.prl objects-Debug

    So it looks like there's a static version of the plugin, but I can't figure out how to use it instead of dynamically loaded one.

    I tried just linking libqcocoa_debug.a into my app, but that didn't help.

    I also tried using Q_IMPORT_PLUGIN(qcocoa); but that didn't work either.

    Does anyone have any ideas?

    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