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 cannot load cocoa plugin

Qt cannot load cocoa plugin

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
cmakemacosplugincocoa
1 Posts 1 Posters 625 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.
  • E Offline
    E Offline
    eejin
    wrote on 28 Oct 2019, 20:44 last edited by eejin
    #1

    Hi, I'm trying to compile and run an application on a MacBook using Qt Creator. There are no issues compiling the project, but when I try and run it, it seems to be unable to load a plugin.

    Could not load the Qt platform plugin "cocoa" in "" even though it was found.
    The application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    

    This error occurs both when trying to run the application from Qt Creator or via Finder. It seems to only happen when I use the CMake build system (no issues when using QMake), but my existing project that I need to deploy on MacOS uses CMake.

    My steps to reproduce are:

    • Install a completely clean MacOS (no user data)
    • Install CMake 3.15
    • Install Qt 5.13.1 MacOS package
    • Open QtCreator->New Project->Qt Quick Application - Scroll
    • Set build system to CMake (important)
    • Compile and notice error

    I am using:
    Qt 5.13.1
    macOS Catalina 10.15
    Apple Clang 11

    I recognize that for final user deployment I will need to use the macqtdeploy tool to copy the Qt libraries to the executable folder, but I should be able to run my app from QtCreator without doing this? Especially as it works fine when using QMake.

    1 Reply Last reply
    0

    1/1

    28 Oct 2019, 20:44

    • Login

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