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)
QtWS25 Last Chance

Building Qt Android app with an external lib (Assimp)

Scheduled Pinned Locked Moved Mobile and Embedded
androidlibrarieslibs
7 Posts 2 Posters 3.4k 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.
  • S Offline
    S Offline
    Sergobot
    wrote on 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      0
      • SGaistS SGaist

        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 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          0
          • SGaistS SGaist

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

            S Offline
            S Offline
            Sergobot
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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
              0
              • SGaistS SGaist

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

                S Offline
                S Offline
                Sergobot
                wrote on 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

                • Login

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