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. Android App Development include LDAP on MAC OS X

Android App Development include LDAP on MAC OS X

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
25 Posts 4 Posters 4.8k 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 SGaist
    4 Apr 2018, 21:58

    Hi,

    Did you check the x86 vs x86_64 architecture for your library ?

    M Offline
    M Offline
    mkmp29
    wrote on 10 Apr 2018, 16:23 last edited by
    #10

    @SGaist
    I can only compile the library for the arm architecture. Other architecture fail because they can't find libraries...

    Is there a better solution than compile the library for every architecture of the enddevice?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Apr 2018, 20:21 last edited by
      #11

      No there's not.

      The only alternative is to check whether your targets already have them available in their root filesystem and re-use them.

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

      M 1 Reply Last reply 14 Apr 2018, 10:01
      0
      • S SGaist
        10 Apr 2018, 20:21

        No there's not.

        The only alternative is to check whether your targets already have them available in their root filesystem and re-use them.

        M Offline
        M Offline
        mkmp29
        wrote on 14 Apr 2018, 10:01 last edited by
        #12
        This post is deleted!
        1 Reply Last reply
        0
        • S SGaist
          4 Apr 2018, 21:58

          Hi,

          Did you check the x86 vs x86_64 architecture for your library ?

          M Offline
          M Offline
          mkmp29
          wrote on 14 Apr 2018, 15:35 last edited by
          #13

          @SGaist

          I can compile the application and push it to the virtual device. But i get the error:

          W System.err: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "liblber-2-devel.so.0" not found
          

          This file is contained in the lib folder of my cross compiled library. I read a little bit and tried to load the library during runtime with the QT Object: QLibrary and the function load. But it didnt work.

          this is the part of my .pro file

          ANDROID_EXTRA_LIBS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/libldap.so
          ANDROID_EXTRA_LIBS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/liblber.so
          ANDROID_EXTRA_LIBS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/libldap_r.so
          #ANDROID_EXTRA_LIBS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/liblber-2-devel.so.0
          #ANDROID_EXTRA_LIBS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/liblber-2-devel.so.0.0.0
          #ANDROID_EXTRA_LIBS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/libldap-2-devel.so.0
          #ANDROID_EXTRA_LIBS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/libldap-2-devel.so.0.0.0
          #ANDROID_EXTRA_LIBS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/libldap_r-2-devel.so.0
          #ANDROID_EXTRA_LIBS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/libldap_r-2-devel.so.0.0.0
          
          LIBS += -L$$PWD/lib/compiled/openldap-i686-linux-android_16/lib/ -lldap
          
          INCLUDEPATH += $$PWD/lib/compiled/openldap-i686-linux-android_16/include
          DEPENDPATH += $$PWD/lib/compiled/openldap-i686-linux-android_16/include
          
          PRE_TARGETDEPS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/libldap.a
          LIBS += -L$$PWD/lib/compiled/openldap-i686-linux-android_16/lib/ -llber
          
          INCLUDEPATH += $$PWD/lib/compiled/openldap-i686-linux-android_16/include
          DEPENDPATH += $$PWD/lib/compiled/openldap-i686-linux-android_16/include
          
          PRE_TARGETDEPS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/liblber.a
          
          LIBS += -L$$PWD/lib/compiled/openldap-i686-linux-android_16/lib/ -lldap_r
          
          INCLUDEPATH += $$PWD/lib/compiled/openldap-i686-linux-android_16/include
          DEPENDPATH += $$PWD/lib/compiled/openldap-i686-linux-android_16/include
          
          PRE_TARGETDEPS += $$PWD/lib/compiled/openldap-i686-linux-android_16/lib/libldap_r.a
          

          Library loading at the beginning of the main method.

              QLibrary ldap("ldap");
              QLibrary ldap_r("ldap_r");
              QLibrary lber("lber");
          
              if(!ldap.load() || !lber.load() || !ldap_r.load()){
                  qDebug() << "Failed loading library";
              }
          
          

          The libraries that are contained in the lib folder are listed above

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 14 Apr 2018, 20:31 last edited by
            #14

            IIRC, android doesn't support library versioning so ensure that you don't have a symbolic link copied to your package but a copy of the library.

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

            M 2 Replies Last reply 15 Apr 2018, 13:37
            1
            • S SGaist
              14 Apr 2018, 20:31

              IIRC, android doesn't support library versioning so ensure that you don't have a symbolic link copied to your package but a copy of the library.

              M Offline
              M Offline
              mkmp29
              wrote on 15 Apr 2018, 13:37 last edited by mkmp29
              #15
              This post is deleted!
              1 Reply Last reply
              0
              • S SGaist
                14 Apr 2018, 20:31

                IIRC, android doesn't support library versioning so ensure that you don't have a symbolic link copied to your package but a copy of the library.

                M Offline
                M Offline
                mkmp29
                wrote on 15 Apr 2018, 19:54 last edited by
                #16

                @SGaist said in Android App Development include LDAP on MAC OS X:

                IIRC, android doesn't support library versioning so ensure that you don't have a symbolic link copied to your package but a copy of the library.

                I removed the links from the libraries, deleted the links and renamed the lib to its original name, but the error still appears...

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 15 Apr 2018, 20:11 last edited by
                  #17

                  Which one ? The missing symbol or the dlopen error ?

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

                  M 1 Reply Last reply 17 Apr 2018, 15:39
                  0
                  • S SGaist
                    15 Apr 2018, 20:11

                    Which one ? The missing symbol or the dlopen error ?

                    M Offline
                    M Offline
                    mkmp29
                    wrote on 17 Apr 2018, 15:39 last edited by
                    #18

                    @SGaist

                    the dlopen error.

                    I also tried to copy the versioned libs into the same folder in the android libs directory. But it didn't work.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 17 Apr 2018, 20:26 last edited by
                      #19

                      Why are you dlopening the library on Android rather than linking to it ?

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

                      M 1 Reply Last reply 19 Apr 2018, 07:29
                      0
                      • S SGaist
                        17 Apr 2018, 20:26

                        Why are you dlopening the library on Android rather than linking to it ?

                        M Offline
                        M Offline
                        mkmp29
                        wrote on 19 Apr 2018, 07:29 last edited by
                        #20

                        @SGaist

                        this does the the library... I only include the library into my project

                        S 1 Reply Last reply 19 Apr 2018, 21:09
                        0
                        • M mkmp29
                          19 Apr 2018, 07:29

                          @SGaist

                          this does the the library... I only include the library into my project

                          S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 19 Apr 2018, 21:09 last edited by
                          #21

                          @mkmp29 said in Android App Development include LDAP on MAC OS X:

                          this does the the library...

                          Can you rephrase that please ? I don't understand what it means at all.

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

                          sierdzioS 1 Reply Last reply 20 Apr 2018, 05:40
                          0
                          • S SGaist
                            19 Apr 2018, 21:09

                            @mkmp29 said in Android App Development include LDAP on MAC OS X:

                            this does the the library...

                            Can you rephrase that please ? I don't understand what it means at all.

                            sierdzioS Offline
                            sierdzioS Offline
                            sierdzio
                            Moderators
                            wrote on 20 Apr 2018, 05:40 last edited by
                            #22

                            @SGaist said in Android App Development include LDAP on MAC OS X:

                            @mkmp29 said in Android App Development include LDAP on MAC OS X:

                            this does the the library...

                            Can you rephrase that please ? I don't understand what it means at all.

                            If I get it right, he means that he links the LDAP library. That library, however, uses dlopen internally to access yet another library.

                            (Z(:^

                            M 1 Reply Last reply 20 Apr 2018, 07:37
                            0
                            • sierdzioS sierdzio
                              20 Apr 2018, 05:40

                              @SGaist said in Android App Development include LDAP on MAC OS X:

                              @mkmp29 said in Android App Development include LDAP on MAC OS X:

                              this does the the library...

                              Can you rephrase that please ? I don't understand what it means at all.

                              If I get it right, he means that he links the LDAP library. That library, however, uses dlopen internally to access yet another library.

                              M Offline
                              M Offline
                              mkmp29
                              wrote on 20 Apr 2018, 07:37 last edited by
                              #23

                              @sierdzio

                              yes thats right.

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 20 Apr 2018, 07:49 last edited by
                                #24

                                Then this stackoverflow thread might help.

                                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
                                1
                                • A Offline
                                  A Offline
                                  anji 0
                                  wrote on 20 Mar 2019, 13:22 last edited by
                                  #25

                                  @mkmp29 I'm trying to integrate openldap libraries with windows, android and iOS applications built using Qt. Can you please help me with the steps for compiling the openldap libraries using GCC compiler? Thanks in advance.

                                  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