PDA

View Full Version : QSQLITE driver not loaded on Debian Lenny



iskenderoguz
16th July 2013, 08:55
I have two computer. I develop Qt app in first one. And I tried to run my Qt app in second one.
I compile qt 4.8.5 and I write an app in first computer. The app uses sqlite database.
Second computer is embedded which runs debian 5.0 lenny and I am trying to run my app on this machine.
I installed theses debs in second computer in order to use sqlite: libqtcore4, libqt4-sql, libqt4-sql-sqlite.
I downloaded them from archives.debian.net and I use dpkg -i *.deb command.
But after I installed deb when I try to run my app in second computer I get this error:


QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers:

I also copied libQtSql.so.4 to my second computer lib folder.
I can run Qt app without sqlite but I can not run with sqlite
So how can I run this app?

Lykurg
16th July 2013, 09:47
1. with which arguments you have compiled 4.8.5?
2. after "dpkg -i *.deb" are you sure, your program uses that libraries or still your self compiled ones?

iskenderoguz
16th July 2013, 09:54
I have two computers. I develop Qt and then I copied compiled app to second one. Without sqlite my Qt apps works well in second machine.
I compiled Qt in first machine and I use ./configure, make, make install.

ChrisW67
16th July 2013, 09:58
This:

I compile qt 4.8.5
and this:

I installed theses debs: libqtcore4, libqt4-sql, libqt4-sql-sqlite.
imply the opposite of each other.

Have you built your own Qt or are you using the binaries installed using your system's package manager?
If you have built your own Qt 4.8.5 is it, and its libraries, found before the binaries/libraries installed using your system's package manager?
Have you used the qmake from your own Qt, rather than the system Qt, to process your project file?

iskenderoguz
16th July 2013, 10:04
libqt4-core and libqt4-dev is not installed in my second computer. Can it be a reason?
Also all dependencies are provided in my second machine. Only problem is qsqlite.

I am sorry I am not English and my English is not good.

I compiled Qt in first machine not second. And I installed debs in second machine not first.
I wrote app and run in first machine. If there is no problem I copied executable file to second machine and I run app in secon machine
Also I copied *.so files from first to second. If I do not use qsqlite, second machine can work Qt app.

ChrisW67
18th July 2013, 05:23
Also all dependencies are provided in my second machine. Only problem is qsqlite.

Did you deploy the sqldrivers plugins folder?

You should not need any Qt packages installed on the second machine. You need to put your executable, the Qt libraries it uses, the various platform/sqldrivers/imageformats plugin folders it uses, and the wrapper script to set LD_LIBRARY_PATH and run your program in a folder on the target machine. It should be self-contained.
X11 Deployment, Creating the Application Package


I am sorry I am not English and my English is not good.
I am not English either ;) Your English is far better than my Turkish (I assume, no insult intended if I got it wrong)

iskenderoguz
19th July 2013, 09:12
I think problem is different Qt versions (?). Because version of Qt which I compile app is 4.8.5 and version of qt-sdk-sqlite is 4.4.3. I will try to recompile Qt statically