[Qt-interest] Can not load qsqlite4.dll

Bill King bill.king at nokia.com
Wed Oct 21 02:02:19 CEST 2009


On 10/21/2009 12:45 AM, ext 吴海峰 wrote:
>
> Hello everybody.
>
> I have a problem described below.
>
> I use QPluginLoader to load qsqlite4.dll without success. (The
> executable is deployed in a new installed XP System.)
>
> I use VS2005 and Qt4.5.2.
>
> QString str_abs_path_to_sqlite("D:/qsqlite4.sql"); // it does exist.
>
> QPluginLoader *pLoader = new QPluginLoader(str_abs_path_to_sqlite);
>
> if(pLoader->load() == false)
>
> {
>
> qDebug() << pLoader->errorString();
>
> }
>
> In logfile, it proves that it enters into the " qDebug() <<
> pLoader->errorString();" logic.
>
> It says "Program is not installed correct. Reinstalling it may fix the
> problem" which indicated that manifest
>
> file is missing. But sqlite module is compiled in plugin mode and it
> embeds the mainfest already. Why it still produce the error above? I
> can not load qsqlite4.dll now.
>
> Plz help me out. Any suggestions and ideas are welcome. Thanks in advance.
>
> BTW, I have search the list but without luck.
>
Err, why are you manually loading the sqlite4 plugin?


QSqlDatabase::addDatabase() should handle that automatically for you...
eg: QSqlDatabase db=QSqlDatabase::addDatabase("QSQLITE", "sqlite db");

-- 
Bill King, Software Engineer
Qt Development Frameworks, Nokia Pty Ltd
Brisbane Office

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091021/4f57c0db/attachment.html 


More information about the Qt-interest-old mailing list