PDA

View Full Version : Need help on creating plugins



MorrisLiang
25th May 2010, 18:42
I'm creating a plugin.At first,it can be load by QPluginLoader.
Then I need to use QJson in this plugin.
I include the "parser.h" header, modify the pro file.It compiles without an error.
But then it cannot be loaded anymore.
I guess it's something to do with dependency.
The folder structure is like this:

MyApp
.....|----------main.exe
.....|----------libqjson.dll
.....|----------plugins
...................|---------------myplugin.dll
...................|---------------anotherplugin.dll

You can see that all the plugin dlls are in the plugins folder.In this case,myplugin.dll needs the libqjson.dll.But I don't know how to solve the problem.Any one can help me ?

MorrisLiang
26th May 2010, 02:47
It's weird that if I lauch my app in qtcreator.It loads all my plugins.

I solved it.
It's because I'm building a debug version,and the qjson loads a release version of qtcore4(aka qtcore4.dll),so the qjson itself cannot find what it needs making my plugin unavailable.