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. Building Qt Android app with an external lib (Assimp)
Forum Updated to NodeBB v4.3 + New Features

Building Qt Android app with an external lib (Assimp)

Scheduled Pinned Locked Moved Mobile and Embedded
androidlibrarieslibs
7 Posts 2 Posters 3.5k Views 2 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.
  • S Offline
    S Offline
    Sergobot
    wrote on 27 Mar 2015, 17:25 last edited by
    #1

    Hello everybody
    I have built assimp for Android but can't use it in my project. Searching in Google doesn't help. I tried adding this code to my .pro file:

    android {
        INCLUDEPATH += $$PWD/../3rdparty/assimp-3.1.1/include
        DEPENDPATH += $$PWD/../3rdparty/assimp-3.1.1/include
    
        ASSIMP_PATH = $$PWD/../3rdparty/assimp-3.1.1/
        assimp.path = /libs/armeabi-v7a
        assimp.files = $$ASSIMP_PATH/libassimp.so
        INSTALLS += assimp
    }
    

    but it doesn't work.
    So, how to add an external Android library to a Qt project?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Mar 2015, 22:11 last edited by
      #2

      Hi and welcome to devnet,

      What exactly doesn't work ?

      If it's linking you are missing

      LIBS += -lassimp

      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

      S 1 Reply Last reply 28 Mar 2015, 08:54
      0
      • S SGaist
        27 Mar 2015, 22:11

        Hi and welcome to devnet,

        What exactly doesn't work ?

        If it's linking you are missing

        LIBS += -lassimp

        in your pro file

        S Offline
        S Offline
        Sergobot
        wrote on 28 Mar 2015, 08:54 last edited by
        #3

        Hello SGaist,
        I added
        LIBS += -L$$PWD/../3rdparty/assimp-3.1.1/ -lassimp
        to my .pro but still can't compile it because compiler gives me the same error as before:
        error: assimp/Importer.hpp: No such file or directory #include "assimp/Importer.hpp"
        which is really strange because the INCLUDEPATH variable is right and works when I use it for building for other platforms.
        Adding
        LIBS += -lassimp
        doesn't help too

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 28 Mar 2015, 21:35 last edited by SGaist
          #4

          Are you sure that $PWD/../3rdparty/assimp-3.1.1/include point to the right location ?

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

          S 1 Reply Last reply 29 Mar 2015, 07:42
          0
          • S SGaist
            28 Mar 2015, 21:35

            Are you sure that $PWD/../3rdparty/assimp-3.1.1/include point to the right location ?

            S Offline
            S Offline
            Sergobot
            wrote on 29 Mar 2015, 07:42 last edited by
            #5

            Yes, of course, it works when I build for other platforms.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 29 Mar 2015, 22:22 last edited by
              #6

              Are you also using $PWD/../3rdparty/assimp-3.1.1/include for the other platforms ?

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

              S 1 Reply Last reply 30 Mar 2015, 08:09
              0
              • S SGaist
                29 Mar 2015, 22:22

                Are you also using $PWD/../3rdparty/assimp-3.1.1/include for the other platforms ?

                S Offline
                S Offline
                Sergobot
                wrote on 30 Mar 2015, 08:09 last edited by Sergobot
                #7

                Almost yes.
                Now I use $$PWD/../3rdparty/assimp-3.1.1/include(2x '$') for all platforms, including Android, but I still can't build my .pro for it. For using $PWD I should set it to the right value in Projects->Build Environment, for each kit separately, right?

                1 Reply Last reply
                0

                4/7

                28 Mar 2015, 21:35

                • Login

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