Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Where to find libqsqlite
QtWS25 Last Chance

Where to find libqsqlite

Scheduled Pinned Locked Moved Solved General and Desktop
sqlite3errorembedded linux
9 Posts 4 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TMJJ001
    wrote on last edited by
    #1

    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.html

    This 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

    Pablo J. RoginaP 1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by VRonin
      #2

      https://www.sqlite.org/download.html

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      T 1 Reply Last reply
      0
      • T TMJJ001

        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.html

        This 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

        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #3

        @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)

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        T 1 Reply Last reply
        0
        • VRoninV VRonin

          https://www.sqlite.org/download.html

          T Offline
          T Offline
          TMJJ001
          wrote on last edited by TMJJ001
          #4

          @VRonin

          Thanks for the reply.
          Yes here I found the source code of libsqlite. But I think I specifically need libqsqlite.
          Or am I wrong?

          1 Reply Last reply
          0
          • Pablo J. RoginaP Pablo J. Rogina

            @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)

            T Offline
            T Offline
            TMJJ001
            wrote on last edited by
            #5

            @Pablo-J.-Rogina

            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.

            Pablo J. RoginaP 1 Reply Last reply
            0
            • T TMJJ001

              @Pablo-J.-Rogina

              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.

              Pablo J. RoginaP Offline
              Pablo J. RoginaP Offline
              Pablo J. Rogina
              wrote on last edited by
              #6

              @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

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              T 1 Reply Last reply
              1
              • Pablo J. RoginaP Pablo J. Rogina

                @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

                T Offline
                T Offline
                TMJJ001
                wrote on last edited by
                #7

                @Pablo-J.-Rogina

                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?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  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.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  T 1 Reply Last reply
                  2
                  • SGaistS SGaist

                    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.

                    T Offline
                    T Offline
                    TMJJ001
                    wrote on last edited by
                    #9

                    @SGaist

                    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!

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved