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. GUI in shared library can't find find or load the Qt platform plugin "cocoa"
Forum Updated to NodeBB v4.3 + New Features

GUI in shared library can't find find or load the Qt platform plugin "cocoa"

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 359 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.
  • N Offline
    N Offline
    Noturnoz
    wrote on last edited by Noturnoz
    #1

    I have a shared library (.dylib) which contains a function with

    int argc = 0;
    QApplication app(argc, NULL);
    QWidget widget;
    widget.resize(100, 100);
    widget.show();
    app.exec();
    

    I load the shared library in .NET and call the function:

    static class AuthDialog{
        [DllImport("libSampleDialog")]
        public static extern void ShowAuthDialog();
    }
    

    But when I run the application I get this error:
    This application failed to start because it could not find or load the Qt platform plugin "cocoa".

    Can someone tell me how can I get this working?

    Note: The .dylib is loaded correctly, because anything I print before the QApplication gets printed correctly.

    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