Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Build QuaZip for Android Qt
Forum Updated to NodeBB v4.3 + New Features

Build QuaZip for Android Qt

Scheduled Pinned Locked Moved Solved 3rd Party Software
16 Posts 4 Posters 5.6k 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.
  • C Offline
    C Offline
    CharlieG
    wrote on 18 Nov 2016, 16:58 last edited by
    #1

    Hello,

    Think you is it possible to build QuaZip for Android ? I try this :
    /path/to/qmake-android/qmake PREFIX=/path/where/install -spec android-g++

    but this doesn't work.

    Here, .pro file of quazip:

    TEMPLATE = lib
    CONFIG += qt warn_on
    QT -= gui
    
    # The ABI version.
    
    !win32:VERSION = 1.0.0
    
    # 1.0.0 is the first stable ABI.
    # The next binary incompatible change will be 2.0.0 and so on.
    # The existing QuaZIP policy on changing ABI requires to bump the
    # major version of QuaZIP itself as well. Note that there may be
    # other reasons for chaging the major version of QuaZIP, so
    # in case where there is a QuaZIP major version bump but no ABI change,
    # the VERSION variable will stay the same.
    
    # For example:
    
    # QuaZIP 1.0 is released after some 0.x, keeping binary compatibility.
    # VERSION stays 1.0.0.
    # Then some binary incompatible change is introduced. QuaZIP goes up to
    # 2.0, VERSION to 2.0.0.
    # And so on.
    
    
    # This one handles dllimport/dllexport directives.
    DEFINES += QUAZIP_BUILD
    
    # You'll need to define this one manually if using a build system other
    # than qmake or using QuaZIP sources directly in your project.
    CONFIG(staticlib): DEFINES += QUAZIP_STATIC
    
    # Input
    include(quazip.pri)
    
    
    CONFIG(debug, debug|release) {
         mac: TARGET = $$join(TARGET,,,_debug) 
         win32: TARGET = $$join(TARGET,,,d)
    }
    
    unix:!symbian {
        headers.path=$$PREFIX/include/quazip
        headers.files=$$HEADERS
        target.path=$$PREFIX/lib/$${LIB_ARCH}
        INSTALLS += headers target
        LIBS += -lz
        OBJECTS_DIR=.obj
        MOC_DIR=.moc
    	
    }
    
    android {
        headers.path=$$PREFIX/include/quazip
        headers.files=$$HEADERS
        target.path=$$PREFIX/lib/$${LIB_ARCH}
        INSTALLS += headers target
        LIBS += -lz
        OBJECTS_DIR=.obj
        MOC_DIR=.moc
    }
    
    win32 {
        #TODO ....
        headers.path=$$PREFIX/include/quazip
        headers.files=$$HEADERS
        target.path=$$PREFIX/lib
        INSTALLS += headers target
        # workaround for qdatetime.h macro bug
        DEFINES += NOMINMAX
    }
    
    
    symbian {
    
        # Note, on Symbian you may run into troubles with LGPL.
        # The point is, if your application uses some version of QuaZip,
        # and a newer binary compatible version of QuaZip is released, then
        # the users of your application must be able to relink it with the
        # new QuaZip version. For example, to take advantage of some QuaZip
        # bug fixes.
    
        # This is probably best achieved by building QuaZip as a static
        # library and providing linkable object files of your application,
        # so users can relink it.
    
        CONFIG += staticlib
        CONFIG += debug_and_release
    
        LIBS += -lezip
    
        #Export headers to SDK Epoc32/include directory
        exportheaders.sources = $$HEADERS
        exportheaders.path = quazip
        for(header, exportheaders.sources) {
            BLD_INF_RULES.prj_exports += "$$header $$exportheaders.path/$$basename(header)"
        }
    }
    
    Have you an idea to fixe this issues ?
    
    Thank you for advance.
    
    ++
    
    
    Charlie.
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 18 Nov 2016, 22:46 last edited by
      #2

      Hi,

      What exactly doesn't work ?

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

      C 1 Reply Last reply 19 Nov 2016, 10:39
      0
      • S SGaist
        18 Nov 2016, 22:46

        Hi,

        What exactly doesn't work ?

        C Offline
        C Offline
        CharlieG
        wrote on 19 Nov 2016, 10:39 last edited by
        #3

        Hi @SGaist ,

        Ohh yes ... sorry. Here the message of terminal :

        MBPdeChrlesElie:quazip charlie$ /Applications/Qt/Qt5.8.0/5.8/android/bin/qmake -spec android-g++ PREFIX=/Applications/Qt/Qt5.8.0/5.8/android
        MBPdeChrlesElie:quazip charlie$ make
        rm -f libquazip.so
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/Users/charlie/Library/Android/sdk/ndk-bundle/platforms/android-16/arch-arm/ -Wl,-rpath=/Applications/Qt/Qt5.8.0/5.8/android/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -Wl,-soname,libquazip.so -o libquazip.so .obj/qioapi.o .obj/JlCompress.o .obj/quaadler32.o .obj/quacrc32.o .obj/quagzipfile.o .obj/quaziodevice.o .obj/quazip.o .obj/quazipdir.o .obj/quazipfile.o .obj/quazipfileinfo.o .obj/quazipnewinfo.o .obj/unzip.o .obj/zip.o .obj/moc_quagzipfile.o .obj/moc_quaziodevice.o .obj/moc_quazipfile.o  -L/Users/charlie/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/Users/charlie/Library/Android/sdk/ndk-bundle/platforms/android-16/arch-arm//usr/lib -L/Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x -lz -L/Applications/Qt/Qt5.8.0/5.8/android/lib -lQt5Core -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc 
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/qioapi.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/JlCompress.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/quaadler32.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/quacrc32.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/quagzipfile.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/quaziodevice.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/quazip.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/quazipdir.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/quazipfile.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/quazipfileinfo.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/quazipnewinfo.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/unzip.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/zip.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/moc_quagzipfile.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/moc_quaziodevice.o:1:1: invalid character
        /Users/charlie/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: .obj/moc_quazipfile.o:1:1: invalid character
        collect2: error: ld returned 1 exit status
        make: *** [libquazip.so] Error 1
        MBPdeChrlesElie:quazip charlie$ 
        
        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 19 Nov 2016, 20:42 last edited by
          #4

          Where did you download QuaZip from ?

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

          C 1 Reply Last reply 19 Nov 2016, 21:33
          0
          • S SGaist
            19 Nov 2016, 20:42

            Where did you download QuaZip from ?

            C Offline
            C Offline
            CharlieG
            wrote on 19 Nov 2016, 21:33 last edited by
            #5

            @SGaist
            https://sourceforge.net/projects/quazip/

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 19 Nov 2016, 22:03 last edited by
              #6

              Sorry, I couldn't reproduce your problem.

              Which NDK are you using ? I have the r13b

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

              C 1 Reply Last reply 20 Nov 2016, 09:36
              2
              • S SGaist
                19 Nov 2016, 22:03

                Sorry, I couldn't reproduce your problem.

                Which NDK are you using ? I have the r13b

                C Offline
                C Offline
                CharlieG
                wrote on 20 Nov 2016, 09:36 last edited by CharlieG
                #7

                @SGaist
                Super...

                I have just update my NDK (13.0 to 13.1) and the building works.

                Thank you very much.

                PS: mark to solved doesn't work ???

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  CharlieG
                  wrote on 20 Nov 2016, 13:02 last edited by CharlieG
                  #8

                  Re,

                  So, the building works, but I have 2 problems with the library :

                  • impossible to find the quazip lib in the folder : /Applications/Qt/Qt5.8.0/5.8/android
                  • I have this message wher execute the code undefined reference to 'JlCompress::compressFile(QString, QString)'

                  Do you have any idea about these problems?

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 20 Nov 2016, 17:16 last edited by
                    #9

                    Where is the file located ?

                    The second error comes from the first. If the linker can't find the library it can't link to it thus you'll have symboles missing.

                    As for the "solving" part. You need to select ask as question from the "Topic Tools" button and then click on it again to mark the thread as solved.

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

                    C 1 Reply Last reply 20 Nov 2016, 20:17
                    0
                    • S SGaist
                      20 Nov 2016, 17:16

                      Where is the file located ?

                      The second error comes from the first. If the linker can't find the library it can't link to it thus you'll have symboles missing.

                      As for the "solving" part. You need to select ask as question from the "Topic Tools" button and then click on it again to mark the thread as solved.

                      C Offline
                      C Offline
                      CharlieG
                      wrote on 20 Nov 2016, 20:17 last edited by CharlieG
                      #10

                      @SGaist said in Build QuaZip for Android Qt:

                      Where is the file located ?

                      The lib ? Precisely I don't know. With the QuaZip for Mac OS, I have /Applications/Qt/Qt5.8.0/5.8/clang_64/lib/libquazip.1.0.0.dylib.
                      But with QuaZip for Android, I have nothing in /Applications/Qt/Qt5.8.0/5.8/android/lib. Still, I have the headers in /Applications/Qt/Qt5.8.0/5.8/android/include

                      @SGaist said in Build QuaZip for Android Qt:

                      As for the "solving" part. You need to select ask as question from the "Topic Tools" button and then click on it again to mark the thread as solved.

                      Yes, but here I only have two possibilities : Delete topic & Ask as question :(

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 20 Nov 2016, 22:54 last edited by
                        #11

                        Did you install the library ?

                        You must first click on "Ask as question" and then when you open it again you'll have the "mark as solved".

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

                        C 1 Reply Last reply 21 Nov 2016, 12:32
                        0
                        • S SGaist
                          20 Nov 2016, 22:54

                          Did you install the library ?

                          You must first click on "Ask as question" and then when you open it again you'll have the "mark as solved".

                          C Offline
                          C Offline
                          CharlieG
                          wrote on 21 Nov 2016, 12:32 last edited by
                          #12

                          @SGaist
                          Sorry, ... I hadn't to be awake...

                          The lib is installed in / libs / armeabi-v7a. So I copied it to /Applications/Qt/Qt5.8.0/5.8/android/lib for ease.

                          Thank you a lot.

                          G 1 Reply Last reply 31 Oct 2023, 10:26
                          0
                          • C CharlieG
                            21 Nov 2016, 12:32

                            @SGaist
                            Sorry, ... I hadn't to be awake...

                            The lib is installed in / libs / armeabi-v7a. So I copied it to /Applications/Qt/Qt5.8.0/5.8/android/lib for ease.

                            Thank you a lot.

                            G Offline
                            G Offline
                            GulsahAkt
                            wrote on 31 Oct 2023, 10:26 last edited by GulsahAkt
                            #13

                            @CharlieG
                            I am currently trying to use Quazip for Android, but I cannot use Quazip in QT and I am getting an error. What I did was I installed quazip-dev for Ubuntu and referenced it to my qt project, but it does not recognize the library. How did you install Quazip and compile it for Android? Can you please help?

                            jsulmJ 1 Reply Last reply 31 Oct 2023, 10:32
                            0
                            • G GulsahAkt
                              31 Oct 2023, 10:26

                              @CharlieG
                              I am currently trying to use Quazip for Android, but I cannot use Quazip in QT and I am getting an error. What I did was I installed quazip-dev for Ubuntu and referenced it to my qt project, but it does not recognize the library. How did you install Quazip and compile it for Android? Can you please help?

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 31 Oct 2023, 10:32 last edited by
                              #14

                              @GulsahAkt said in Build QuaZip for Android Qt:

                              What I did was I installed quazip-dev for Ubuntu and referenced it to my qt project, but it does not recognize the library. How did you install Quazip and compile it for Android? Can you please help?

                              I already told you in your other thread what you need to do:

                              1. Build QuaZip for android
                              2. Use this build to build your app for Android

                              What about following this suggestion?

                              Installing QuZip packages for your Linux distribution will not help you because those are for your desktop Linux, not for Android...

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

                              G 2 Replies Last reply 31 Oct 2023, 10:43
                              0
                              • jsulmJ jsulm
                                31 Oct 2023, 10:32

                                @GulsahAkt said in Build QuaZip for Android Qt:

                                What I did was I installed quazip-dev for Ubuntu and referenced it to my qt project, but it does not recognize the library. How did you install Quazip and compile it for Android? Can you please help?

                                I already told you in your other thread what you need to do:

                                1. Build QuaZip for android
                                2. Use this build to build your app for Android

                                What about following this suggestion?

                                Installing QuZip packages for your Linux distribution will not help you because those are for your desktop Linux, not for Android...

                                G Offline
                                G Offline
                                GulsahAkt
                                wrote on 31 Oct 2023, 10:43 last edited by
                                #15

                                @jsulm I'm very sorry, after your answer I'm looking into how to compile it for Android. I don't know what I need to do to compile for Android. I couldn't find what to do for Android from Quazip's own instructions.

                                I am inexperienced in this matter and unfortunately this was the only post I came across on the forum about it.

                                1 Reply Last reply
                                0
                                • jsulmJ jsulm
                                  31 Oct 2023, 10:32

                                  @GulsahAkt said in Build QuaZip for Android Qt:

                                  What I did was I installed quazip-dev for Ubuntu and referenced it to my qt project, but it does not recognize the library. How did you install Quazip and compile it for Android? Can you please help?

                                  I already told you in your other thread what you need to do:

                                  1. Build QuaZip for android
                                  2. Use this build to build your app for Android

                                  What about following this suggestion?

                                  Installing QuZip packages for your Linux distribution will not help you because those are for your desktop Linux, not for Android...

                                  G Offline
                                  G Offline
                                  GulsahAkt
                                  wrote on 1 Nov 2023, 11:34 last edited by
                                  #16

                                  @jsulm I managed to zip/unzip with quazip for Android device. With guidance from @jsulm. Thank you.

                                  https://forum.qt.io/topic/151699/how-to-unzip-an-application-running-on-an-android-device-using-qt

                                  1 Reply Last reply
                                  1

                                  • Login

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