Where to find libqsqlite
-
Dear all,
I'm having a irritating problem. I get following error when I try to compile a application for my embedded system. (embedded linux)
QSqlDatabase: QSQLITE driver not loaded QSqlDatabase: available drivers: Failed to open DB QSqlQuery::exec: database not open
So I'm missing the libqsqlite.so file.
After searching the internet I found the following library for an armV7 which I use.
http://rpmfind.net/linux/RPM/mageia/cauldron/armv7hl/media/core/release/libqt4-database-plugin-sqlite-4.8.7-21.mga7.armv7hl.htmlThis is for qt 4.8.7 and I use 4.8.6. But still I tried it. I copied the file into the following directory:
/usr/lib libQtCore.so LibQtGUI.so … libQtSql.so … Qt Plugins Sqldrivers HERE YOU SHOULD HAVE libqsqlite.so which I didn’t until I downloaded it from the link above …
Then I tried again. I still have the same error. So I think I need to compile the library for my specific case. But I can't find the source code to do this. (find only libsqlite)
Am I on the correct way? Or is there an other error?
(When I compile the code for my desktop, it works!)
(When I compile code without using the database it also works on my embedded system)I this is the problem could somebody provide me with the correct source code please?
Thanks in advance,
Kind regards -
-
@TMJJ001 said in Where to find libqsqlite:
I try to compile
Is it really at compile time or you've got those errors when running the application in the embedded device?
IIRC it looks like a deployment issue, see this response suggesting proper location of files (although it refers to DLLs I guess it still applies to .so files)
-
Thanks for the reply.
The errors occure when the application is running.
I will try that solution tomorrow. (forgot my dev board)Although I think the issue is that the libqsqlite isn't compiled with the good compiler.
For example when I want to install sqlite3 package on my embedded system, I need to compile it with the following compiler:
arm-linux-gnueabi-gcc. Then it works. When I compile it with different one, it doesn't work.Thanks.
-
@TMJJ001 said in Where to find libqsqlite:
When I compile it with different one, it doesn't work.
What other options do you have? The compiler you use should be able to provide the proper binaries for your platform.
Assuming that your embedded device is TI AM3358 (from some of your previous posts), and giving that you are using/could use the Processor SDK toolchain from TI, you may want to cross-compile the Qt plugin for Sqlite
-
If I understand you correct, you mean that I need to compile libqsqlite with this compiler?
That's what I try to accomplish. But to compile this, I first need to find the source code of libqsqlite to make the proper libqsqlite.so library for my system and this is what I meant. I can't find the source code for this library. Do you know what I mean? -
Hi,
The most straight forward is to use the SQLite library provided with your embedded system's distribution. If it doesn't provide any, then the simplest is to use the copy that comes with Qt4. So basically, you don't need anything special, just follow procedure provided in Qt's documentation to build the plugin.
In any, case, you should consider updating Qt to 4.8.7 which is the latest and last of the Qt 4 series. If possible, consider moving to Qt 5.
-
Thanks for the reply. Indeed you are wright. It is very easy actually. I just compiled qt4.8.6 for my system. Then I found the sqlite project in sqldrivers. Compiled this library for my system, copied it and it works!
Very easy. Learned again a lot!
Thank you all for the great support!