Plugin Load Problem
I'm development a software that need to load a lib("libmacdocktile.dylib") to show text in dock icon, imitating cocoa behavior.
@QPluginLoader* loader = new QPluginLoader(plugins.at(i));
QObject *o = loader->instance();
plugins.at(i) denote the absolute path of the lib
(it's /Users/patricklee/space/uHub/uHub/uHub.app/Contents/MacOS/docktile/libmacdocktile.dylib in my dev environment).
When I run it in Qt, it works fine and successfully loaded to o.
But when I run outside,
change to /Users/patricklee/space/uHub/uHub/, and open uHub.app, or
change to /Users/patricklee/space/uHub/uHub/uHub.app/Contents/MacOS, and open uhub,
the lib doesn't load and return 0x00 to o.
How to make it work outside qt?
any one could help?
How do you find the absolute path? Is it correct?
I place the lib in the ***.app/Contents/MacOS/,
it's absolutely correct because I can run in the Qt.