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. Adding library dependencies to Android Shared Library project
Forum Update on Monday, May 27th 2025

Adding library dependencies to Android Shared Library project

Scheduled Pinned Locked Moved Solved Mobile and Embedded
dynamic linkingarmandroid library
13 Posts 4 Posters 9.3k 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.
  • J Offline
    J Offline
    jsulm
    Lifetime Qt Champion
    wrote on 4 May 2016, 12:38 last edited by
    #2

    Check Qt documentation: http://doc.qt.io/qt-5/qmake-project-files.html#declaring-other-libraries

    In your PRO file (I assume you're using qmake):
    INCLUDEPATH += <your path>
    LIBS += -L/usr/local/lib -lmath

    Just change the paths and the lib name as needed.

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • I Offline
      I Offline
      Igor Oliveira
      wrote on 4 May 2016, 13:10 last edited by
      #3

      Thanks for the help, jsulm. That solved the issue!

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BrunoGeorgevich
        wrote on 14 Jun 2016, 02:28 last edited by
        #4

        Hello guys, i've tried link some third-party shared libraries into my android application, but always i've encountered this three errors :

              :-1: warning: skipping incompatible /home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt/build-brisa/libbrisa.so while searching for brisa
              :-1: error: collect2: error: ld returned 1 exit status
              :-1: error: error: cannot find -lbrisa
        

        i've already read a lot about this errors and i couldnt at least build the project.

        i am using:
        Qt 5.7 RC and QtCreator 4.0.1

        BCU.pro

        TEMPLATE = app
        
        QT += qml quick widgets network xml
        qtHaveModule(webengine) {
                QT += webengine
                DEFINES += QT_WEBVIEW_WEBENGINE_BACKEND
        }
        
        RESOURCES += View/qml.qrc \
            Assets/pics/pics.qrc
        include(brisa.pri)
        
        DISTFILES += Assets/TO_DO.txt \
            android/AndroidManifest.xml \
            android/gradle/wrapper/gradle-wrapper.jar \
            android/gradlew \
            android/res/values/libs.xml \
            android/build.gradle \
            android/gradle/wrapper/gradle-wrapper.properties \
            android/gradlew.bat
        
        HEADERS += \
            Controller/controlpointbcu.h \
            Controller/dataobject.h \
            Controller/filedownloader.h \
            Controller/folderCompressor.h \
            Controller/essencials/qqmlhelpers.h \
            Controller/essencials/qqmlobjectlistmodel.h
        
        SOURCES += Controller/main.cpp \
            Controller/controlpointbcu.cpp \
            Controller/dataobject.cpp \
            Controller/filedownloader.cpp \
            Controller/folderCompressor.cpp \
            Controller/essencials/qqmlhelpers.cpp \
            Controller/essencials/qqmlobjectlistmodel.cpp
        
        contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
            ANDROID_EXTRA_LIBS = \
                $$PWD/../../build-brisa/libbrisa.so
        }
        
        ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
        

        brisa.pri

        BASEDIR_BRUNO = /home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt
        BASEDIR_MAC = /Users/compemac2/brisa-project/platforms/qt/build-brisa-iphonesimulator_clang_Qt_5_5_1_for_iOS-Debug/
        
        INCLUDEPATH += $$BASEDIR_BRUNO/lib/include
        LIBS += -L$$BASEDIR_BRUNO/build-brisa -lbrisa
        

        Compile Output

        23:10:40: Running steps for project BCU...
        23:10:40: Configuration unchanged, skipping qmake step.
        23:10:40: Starting: "/usr/bin/make" 
        /home/bruno/Documentos/Qt/5.7/android_armv7/bin/qmake -spec android-g++ -o Makefile ../BCU/BCU.pro
        /home/bruno/Documentos/Android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/bruno/Documentos/Android/android-ndk-r11c/platforms/android-9/arch-arm/ -Wl,-soname,libBCU.so -Wl,-rpath=/home/bruno/Documentos/Qt/5.7/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libBCU.so main.o controlpointbcu.o dataobject.o filedownloader.o folderCompressor.o qqmlhelpers.o qqmlobjectlistmodel.o qrc_qml.o qrc_pics.o moc_controlpointbcu.o moc_dataobject.o moc_filedownloader.o moc_folderCompressor.o moc_qqmlhelpers.o moc_qqmlobjectlistmodel.o   -L/home/bruno/Documentos/Android/android-ndk-r11c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/home/bruno/Documentos/Android/android-ndk-r11c/platforms/android-9/arch-arm//usr/lib -L/home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt/build-brisa -lbrisa -L/home/bruno/Documentos/Qt/5.7/android_armv7/lib -lQt5Quick -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Xml -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
        /home/bruno/Documentos/Android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt/build-brisa/libbrisa.so while searching for brisa
        Makefile:251: recipe for target 'libBCU.so' failed
        /home/bruno/Documentos/Android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lbrisa
        main.o:main.cpp:function main: error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::start()'
        main.o:main.cpp:function main: error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::discover()'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::deviceRemoved(QString): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::deviceGone(QString)'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::ControlPointBCU(QQmlApplicationEngine*, QObject*, QString, int): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::ControlPoint(QObject*, QString, int)'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::ControlPointBCU(QQmlApplicationEngine*, QObject*, QString, int): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::~ControlPoint()'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::controlpoint::Device::Device(QTemporaryFile*, QUrl*, QObject*)'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::controlpoint::Device::getAttribute(brisa::upnp::controlpoint::Device::xmlTags)'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::controlpoint::Device::getAttribute(brisa::upnp::controlpoint::Device::xmlTags)'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::controlpoint::Device::getServiceList()'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::AbstractService::getAction(QString const&)'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::controlpoint::Service::call(QString const&, QMap<QString, QString>&)'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::AbstractService::setAttribute(brisa::upnp::AbstractService::xmlTags, QString const&)'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::AbstractService::setAttribute(brisa::upnp::AbstractService::xmlTags, QString const&)'
        controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::decodeJsonList(): error: undefined reference to 'brisa::upnp::controlpoint::Device::getAttribute(brisa::upnp::controlpoint::Device::xmlTags)'
        moc_controlpointbcu.o:moc_controlpointbcu.cpp:function ControlPointBCU::~ControlPointBCU(): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::~ControlPoint()'
        moc_controlpointbcu.o:moc_controlpointbcu.cpp:function QMetaTypeIdQObject<brisa::upnp::controlpoint::Device*, 8>::qt_metatype_id(): error: undefined reference to 'brisa::upnp::controlpoint::Device::staticMetaObject'
        moc_controlpointbcu.o:moc_controlpointbcu.cpp:function ControlPointBCU::qt_metacast(char const*): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::qt_metacast(char const*)'
        moc_controlpointbcu.o:moc_controlpointbcu.cpp:function ControlPointBCU::qt_metacall(QMetaObject::Call, int, void**): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::qt_metacall(QMetaObject::Call, int, void**)'
        moc_controlpointbcu.o:moc_controlpointbcu.cpp:typeinfo for ControlPointBCU: error: undefined reference to 'typeinfo for brisa::upnp::controlpoint::ControlPoint'
        moc_controlpointbcu.o:moc_controlpointbcu.cpp:ControlPointBCU::staticMetaObject: error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::staticMetaObject'
        collect2: error: ld returned 1 exit status
        make: *** [libBCU.so] Error 1
        23:10:40: The process "/usr/bin/make" exited with code 2.
        Error while building/deploying project BCU (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.0))
        When executing step "Make"
        23:10:40: Elapsed time: 00:00.
        

        Please, anyone can help me?
        Sorry about the english =B

        J 1 Reply Last reply 14 Jun 2016, 04:56
        0
        • B BrunoGeorgevich
          14 Jun 2016, 02:28

          Hello guys, i've tried link some third-party shared libraries into my android application, but always i've encountered this three errors :

                :-1: warning: skipping incompatible /home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt/build-brisa/libbrisa.so while searching for brisa
                :-1: error: collect2: error: ld returned 1 exit status
                :-1: error: error: cannot find -lbrisa
          

          i've already read a lot about this errors and i couldnt at least build the project.

          i am using:
          Qt 5.7 RC and QtCreator 4.0.1

          BCU.pro

          TEMPLATE = app
          
          QT += qml quick widgets network xml
          qtHaveModule(webengine) {
                  QT += webengine
                  DEFINES += QT_WEBVIEW_WEBENGINE_BACKEND
          }
          
          RESOURCES += View/qml.qrc \
              Assets/pics/pics.qrc
          include(brisa.pri)
          
          DISTFILES += Assets/TO_DO.txt \
              android/AndroidManifest.xml \
              android/gradle/wrapper/gradle-wrapper.jar \
              android/gradlew \
              android/res/values/libs.xml \
              android/build.gradle \
              android/gradle/wrapper/gradle-wrapper.properties \
              android/gradlew.bat
          
          HEADERS += \
              Controller/controlpointbcu.h \
              Controller/dataobject.h \
              Controller/filedownloader.h \
              Controller/folderCompressor.h \
              Controller/essencials/qqmlhelpers.h \
              Controller/essencials/qqmlobjectlistmodel.h
          
          SOURCES += Controller/main.cpp \
              Controller/controlpointbcu.cpp \
              Controller/dataobject.cpp \
              Controller/filedownloader.cpp \
              Controller/folderCompressor.cpp \
              Controller/essencials/qqmlhelpers.cpp \
              Controller/essencials/qqmlobjectlistmodel.cpp
          
          contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
              ANDROID_EXTRA_LIBS = \
                  $$PWD/../../build-brisa/libbrisa.so
          }
          
          ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
          

          brisa.pri

          BASEDIR_BRUNO = /home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt
          BASEDIR_MAC = /Users/compemac2/brisa-project/platforms/qt/build-brisa-iphonesimulator_clang_Qt_5_5_1_for_iOS-Debug/
          
          INCLUDEPATH += $$BASEDIR_BRUNO/lib/include
          LIBS += -L$$BASEDIR_BRUNO/build-brisa -lbrisa
          

          Compile Output

          23:10:40: Running steps for project BCU...
          23:10:40: Configuration unchanged, skipping qmake step.
          23:10:40: Starting: "/usr/bin/make" 
          /home/bruno/Documentos/Qt/5.7/android_armv7/bin/qmake -spec android-g++ -o Makefile ../BCU/BCU.pro
          /home/bruno/Documentos/Android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/bruno/Documentos/Android/android-ndk-r11c/platforms/android-9/arch-arm/ -Wl,-soname,libBCU.so -Wl,-rpath=/home/bruno/Documentos/Qt/5.7/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libBCU.so main.o controlpointbcu.o dataobject.o filedownloader.o folderCompressor.o qqmlhelpers.o qqmlobjectlistmodel.o qrc_qml.o qrc_pics.o moc_controlpointbcu.o moc_dataobject.o moc_filedownloader.o moc_folderCompressor.o moc_qqmlhelpers.o moc_qqmlobjectlistmodel.o   -L/home/bruno/Documentos/Android/android-ndk-r11c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/home/bruno/Documentos/Android/android-ndk-r11c/platforms/android-9/arch-arm//usr/lib -L/home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt/build-brisa -lbrisa -L/home/bruno/Documentos/Qt/5.7/android_armv7/lib -lQt5Quick -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Xml -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
          /home/bruno/Documentos/Android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt/build-brisa/libbrisa.so while searching for brisa
          Makefile:251: recipe for target 'libBCU.so' failed
          /home/bruno/Documentos/Android/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lbrisa
          main.o:main.cpp:function main: error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::start()'
          main.o:main.cpp:function main: error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::discover()'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::deviceRemoved(QString): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::deviceGone(QString)'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::ControlPointBCU(QQmlApplicationEngine*, QObject*, QString, int): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::ControlPoint(QObject*, QString, int)'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::ControlPointBCU(QQmlApplicationEngine*, QObject*, QString, int): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::~ControlPoint()'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::controlpoint::Device::Device(QTemporaryFile*, QUrl*, QObject*)'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::controlpoint::Device::getAttribute(brisa::upnp::controlpoint::Device::xmlTags)'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::controlpoint::Device::getAttribute(brisa::upnp::controlpoint::Device::xmlTags)'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::controlpoint::Device::getServiceList()'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::AbstractService::getAction(QString const&)'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::controlpoint::Service::call(QString const&, QMap<QString, QString>&)'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::AbstractService::setAttribute(brisa::upnp::AbstractService::xmlTags, QString const&)'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::replyFinished(QNetworkReply*): error: undefined reference to 'brisa::upnp::AbstractService::setAttribute(brisa::upnp::AbstractService::xmlTags, QString const&)'
          controlpointbcu.o:controlpointbcu.cpp:function ControlPointBCU::decodeJsonList(): error: undefined reference to 'brisa::upnp::controlpoint::Device::getAttribute(brisa::upnp::controlpoint::Device::xmlTags)'
          moc_controlpointbcu.o:moc_controlpointbcu.cpp:function ControlPointBCU::~ControlPointBCU(): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::~ControlPoint()'
          moc_controlpointbcu.o:moc_controlpointbcu.cpp:function QMetaTypeIdQObject<brisa::upnp::controlpoint::Device*, 8>::qt_metatype_id(): error: undefined reference to 'brisa::upnp::controlpoint::Device::staticMetaObject'
          moc_controlpointbcu.o:moc_controlpointbcu.cpp:function ControlPointBCU::qt_metacast(char const*): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::qt_metacast(char const*)'
          moc_controlpointbcu.o:moc_controlpointbcu.cpp:function ControlPointBCU::qt_metacall(QMetaObject::Call, int, void**): error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::qt_metacall(QMetaObject::Call, int, void**)'
          moc_controlpointbcu.o:moc_controlpointbcu.cpp:typeinfo for ControlPointBCU: error: undefined reference to 'typeinfo for brisa::upnp::controlpoint::ControlPoint'
          moc_controlpointbcu.o:moc_controlpointbcu.cpp:ControlPointBCU::staticMetaObject: error: undefined reference to 'brisa::upnp::controlpoint::ControlPoint::staticMetaObject'
          collect2: error: ld returned 1 exit status
          make: *** [libBCU.so] Error 1
          23:10:40: The process "/usr/bin/make" exited with code 2.
          Error while building/deploying project BCU (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.0))
          When executing step "Make"
          23:10:40: Elapsed time: 00:00.
          

          Please, anyone can help me?
          Sorry about the english =B

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 14 Jun 2016, 04:56 last edited by jsulm
          #5

          @BrunoGeorgevich For which architecture is that library built? Is it for ARMv7? Which compiler was used to build it?
          You can check this with:

          file /home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt/build-brisa/libbrisa.so
          

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          B 1 Reply Last reply 14 Jun 2016, 16:59
          0
          • J jsulm
            14 Jun 2016, 04:56

            @BrunoGeorgevich For which architecture is that library built? Is it for ARMv7? Which compiler was used to build it?
            You can check this with:

            file /home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt/build-brisa/libbrisa.so
            
            B Offline
            B Offline
            BrunoGeorgevich
            wrote on 14 Jun 2016, 16:59 last edited by
            #6

            @jsulm the architecture is arm v7 and the compiler is GCC 5.2. That library really exists, but I didn't understand what you wanna say with "you can check this with". Again, I'm sorry about the English.

            This shared library works when I built the project for desktop, using the GCC compiler, but with Android occurres this errors mentioned above.

            J 1 Reply Last reply 15 Jun 2016, 04:18
            0
            • B BrunoGeorgevich
              14 Jun 2016, 16:59

              @jsulm the architecture is arm v7 and the compiler is GCC 5.2. That library really exists, but I didn't understand what you wanna say with "you can check this with". Again, I'm sorry about the English.

              This shared library works when I built the project for desktop, using the GCC compiler, but with Android occurres this errors mentioned above.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 15 Jun 2016, 04:18 last edited by
              #7

              @BrunoGeorgevich I mean: can you please execute this line on the command line and post its output here?

              file /home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt/build-brisa/libbrisa.so
              

              You cannot use the same library binary on desktop and Android/ARM! (unless your desktop is ARM as well)

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              B 1 Reply Last reply 22 Jun 2016, 01:48
              0
              • J jsulm
                15 Jun 2016, 04:18

                @BrunoGeorgevich I mean: can you please execute this line on the command line and post its output here?

                file /home/bruno/Documentos/Workspaces/Qt_Projects/brisa-project/platforms/qt/build-brisa/libbrisa.so
                

                You cannot use the same library binary on desktop and Android/ARM! (unless your desktop is ARM as well)

                B Offline
                B Offline
                BrunoGeorgevich
                wrote on 22 Jun 2016, 01:48 last edited by
                #8

                @jsulm so, I've need to recompile my shared library to Arm v7? How can I turn this binares compatible with Arm V7?

                J 1 Reply Last reply 22 Jun 2016, 04:15
                0
                • B BrunoGeorgevich
                  22 Jun 2016, 01:48

                  @jsulm so, I've need to recompile my shared library to Arm v7? How can I turn this binares compatible with Arm V7?

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 22 Jun 2016, 04:15 last edited by
                  #9

                  @BrunoGeorgevich You have to build this library for ARMv7 or get a build for ARMv7 from somewhere. You cannot turn a x86 binary into ARMv7 binary.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  B 1 Reply Last reply 22 Jun 2016, 13:22
                  0
                  • J jsulm
                    22 Jun 2016, 04:15

                    @BrunoGeorgevich You have to build this library for ARMv7 or get a build for ARMv7 from somewhere. You cannot turn a x86 binary into ARMv7 binary.

                    B Offline
                    B Offline
                    BrunoGeorgevich
                    wrote on 22 Jun 2016, 13:22 last edited by
                    #10

                    @jsulm Do you know what i need do add to my qmake to compile this lib to ARM v7?

                    QT       += core network xml gui
                    
                    CONFIG   += console
                    CONFIG   += qt warn_on
                    CONFIG   += hardening
                    CONFIG   -= app_bundle
                    
                    TEMPLATE = lib
                    
                    TARGET = brisa
                    
                    INCLUDEPATH += "include"
                    INCLUDEPATH += "src"
                    
                    #!exists( brisa.pri ) {
                    ! brisa.pri {
                        message("Creating the brisa.pri configuration file. Do not edit this file.")
                        system(python scripts/gen_brisa_pri.py)
                        QMAKE_CLEAN += brisa.pri
                    }
                    
                    HEADERS += \
                       //all .h
                    
                    SOURCES += \
                        //all .cpp
                    

                    I never do something like this, to compile a lib to ARM v7. The code above is the .pro of the lib. What i need to add to this code, to compile it to ARM v7?

                    J 1 Reply Last reply 23 Jun 2016, 04:13
                    0
                    • Pablo J. RoginaP Offline
                      Pablo J. RoginaP Offline
                      Pablo J. Rogina
                      wrote on 22 Jun 2016, 20:41 last edited by
                      #11

                      @Igor-Oliveira what about this document: Compiling QT-Brisa to Android and generate the Apk File?
                      I didn't try the whole process, but as a result of the build steps, I'd expect the libbrisa.so for Android built somewhere in your workspace...

                      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

                      1 Reply Last reply
                      0
                      • B BrunoGeorgevich
                        22 Jun 2016, 13:22

                        @jsulm Do you know what i need do add to my qmake to compile this lib to ARM v7?

                        QT       += core network xml gui
                        
                        CONFIG   += console
                        CONFIG   += qt warn_on
                        CONFIG   += hardening
                        CONFIG   -= app_bundle
                        
                        TEMPLATE = lib
                        
                        TARGET = brisa
                        
                        INCLUDEPATH += "include"
                        INCLUDEPATH += "src"
                        
                        #!exists( brisa.pri ) {
                        ! brisa.pri {
                            message("Creating the brisa.pri configuration file. Do not edit this file.")
                            system(python scripts/gen_brisa_pri.py)
                            QMAKE_CLEAN += brisa.pri
                        }
                        
                        HEADERS += \
                           //all .h
                        
                        SOURCES += \
                            //all .cpp
                        

                        I never do something like this, to compile a lib to ARM v7. The code above is the .pro of the lib. What i need to add to this code, to compile it to ARM v7?

                        J Offline
                        J Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on 23 Jun 2016, 04:13 last edited by
                        #12

                        @BrunoGeorgevich You don't have to change anything there. You have to use qmake and make from your ARMv7 build environment.

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        B 1 Reply Last reply 28 Jun 2016, 05:32
                        0
                        • J jsulm
                          23 Jun 2016, 04:13

                          @BrunoGeorgevich You don't have to change anything there. You have to use qmake and make from your ARMv7 build environment.

                          B Offline
                          B Offline
                          BrunoGeorgevich
                          wrote on 28 Jun 2016, 05:32 last edited by
                          #13

                          @jsulm thanks bro. I, as you Said, just needed to built my lib to arm v7, before add it to my project. Thanks!

                          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