.lib is not a valid Qt plugin
Hi,
I'm having trouble trying to get my app to work. I use .dll plugins on windows vesrion of my app. I compiled the plugins with .lib and .dll extensions to see which one works on winCE.
None worked, with the dll failing and the .olib showing "not a valid qt plugin" message.
what am I missing?
Re: .lib is not a valid Qt plugin
It's not possible to answer your question with so little information given.
Re: .lib is not a valid Qt plugin
Code:
#if defined(Q_WS_WINCE)
fileName += ".lib";
#endif
const QString pluginFileName
(pluginsDir.
absoluteFilePath(fileName
));
QObject *plugin
= loader.
instance();
if (plugin) {
if(qobject_cast<BasicStudentInterface *>(plugin))
{
instantiateBasicStudentPlugin(plugin);
}
else if(qobject_cast<IStudentMessenger *>(plugin))
{
instantiateStudentMessengerPlugin(plugin);
}
...
}
on my code when I try to read fileName += ".lib" plugin it says that "the file plugin.lib is not a valid Qt plugin".
Then I go to my plugin project's properties and change the configuration type to .dll and fileName += ".dll"... recompile all and try to run with dll an error message says that "could not load shared library".
Is there any especific configuration for plugins to work? do they need to be .lib or .dll?
Re: .lib is not a valid Qt plugin
I'd start with Dependency Walker.
Re: .lib is not a valid Qt plugin
I don't know what I did now I can't make the .dll file... It compiles perfectly with .lib and when I change the configuration type to .dll it appears 600 linking errors...
How may I use the dependencies walker? the 1.0 version for wince under a wince emulator? or the windows version on the .dll file since it doesn't read .lib files...?
I can't compile a new dll file now... but the dependency walker on the previous .dll says that Qtgui4.dll, qtnetwork4.dll, qtcore4.dll, coredll.dll and msvc90.dll are missing...
Where do I add this dependencies? I'm not very good with visual studio...
Re: .lib is not a valid Qt plugin
lib files are only required during compilation and not run-time. For the latter you need dll files.
Re: .lib is not a valid Qt plugin
how do I add the dependencies for the compilation then?
Re: .lib is not a valid Qt plugin
I don't understand your question.
Re: .lib is not a valid Qt plugin
I've managed to make a new dll (had to remove the current project and open .pro file again)
now dependency walker says this:
Code:
Module File Time Stamp Link Time Stamp File Size Attr. Link Checksum Real Checksum CPU Subsystem Symbols Preferred Base Actual Base Virtual Size Load Order File Ver Product Ver Image Ver Linker Ver OS Ver Subsystem Ver
----- ------------------ ---------------- ---------------- --------- ----- ------------- ------------- ----- -------------- ------- -------------- ----------- ------------ ---------- -------- ----------- --------- ---------- ------ -------------
[ ? ] COREDLL.DLL Error opening file. The system cannot find the file specified (2).
[ ? ] MSVCR90.DLL Error opening file. The system cannot find the file specified (2).
[ ? ] QTCORE4.DLL Error opening file. The system cannot find the file specified (2).
[ ? ] QTGUI4.DLL Error opening file. The system cannot find the file specified (2).
[ ? ] QTNETWORK4.DLL Error opening file. The system cannot find the file specified (2).
[ ] CALLLISTCLIENT.DLL 19-05-2011 14:59 19-05-2011 14:59 108.544 A 0x00000000 0x0002784F Thumb WinCE 2.0+ GUI None 0x10000000 Unknown 0x0001E000 Not Loaded N/A N/A 0.0 9.0 5.2 5.2
these missing dll's are on the app's folder in order for the mainwindow to work. and the dll is on "plugins" folder.
My question was what do I have to do to build a compatible plugin for my application?
Re: .lib is not a valid Qt plugin
First you need to find out what is wrong with the plugin. If the missing libraries are present in the application directory then apparently the problem is related to something else. Make sure the paths are correct and the file exists and is readable before loading the plugin.
Re: .lib is not a valid Qt plugin
fixed it! Don't know how but I did! lol I think was something that i've changed in the .pro file before reloading it to visual studio.
Thanks
Re: .lib is not a valid Qt plugin