Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] Libs for Android not found
Servers for Qt installer are currently down

[SOLVED] Libs for Android not found

Scheduled Pinned Locked Moved Mobile and Embedded
10 Posts 2 Posters 3.4k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Mr. David
    wrote on 12 Nov 2013, 17:41 last edited by
    #1

    I am trying to build a simple Qt5 Gui application for Android using sqlite3. As soon as I add
    @LIBS += -lsqlite3@

    I get the following errormessage:
    @/home/user/Documents/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86/arm-linux-androideabi/bin/ld: cannot find -lsqlite3
    collect2: error: ld returned 1 exit status
    make: *** [libSQL.so] Error 1
    09:32:45: The process "/usr/bin/make" exited with code 2.@
    If I try to build the project as a desktop application, everything goes just fine.
    I have no clue how to fix this, any help highly appreciated.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 12 Nov 2013, 20:54 last edited by
      #2

      Hi and welcome to devnet,

      Either sqlite3 for android can't be found or you don't have it built for android. Check if you can find it and add the path to your pro file.

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mr. David
        wrote on 12 Nov 2013, 23:29 last edited by
        #3

        Thank you for the response.
        How can I build sqlite3 for android? I wanted to do that, but I could not found intructions on how to do it.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Mr. David
          wrote on 13 Nov 2013, 18:49 last edited by
          #4

          I tried to build sqlite3 for android using this instruction:
          https://github.com/lookout/sqlite-android

          I think it worked, but how can I add the path to it? Where should I place the files which were created?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 13 Nov 2013, 20:16 last edited by
            #5

            You can either put it the correct lib folder of the NDK, or add

            @-L/Path/to/your/sqlite3/library@

            In your pro file

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

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Mr. David
              wrote on 13 Nov 2013, 22:38 last edited by
              #6

              Setting the path did not change anything. I added the files sqlite3.h and sqlite3.c directly to the project, that seems to help. Does not look like the proper solution, though.

              I also need to include expat and expatmm:
              http://expat.sourceforge.net/
              Any idea about how to build these for android?
              Thanks in advance.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 14 Nov 2013, 21:47 last edited by
                #7

                You'll need to cross-compile them for android

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

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  Mr. David
                  wrote on 18 Nov 2013, 16:21 last edited by
                  #8

                  I tried to figure out how to cross-compile the library, but I did not have success. Could you provide me with a link to a website or an explanation of how to exactly cross-compile something like the expat library?
                  Thank you so much.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 18 Nov 2013, 21:12 last edited by
                    #9

                    Are you thinking of something like "this":https://github.com/android/platform_external_expat ?

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

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Mr. David
                      wrote on 2 Dec 2013, 19:21 last edited by
                      #10

                      In case anybody is interested:
                      I did not manage to cross-compile the library, but I realized that Qt includes Sqlite3 and a XML parser, which was all I needed. I ended up rewriting the old code and removed the external libraries, so now I hopefully won't have to care about platform-specific libraries anymore.

                      Thanks for the help!

                      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