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. How to unzip an application running on an Android device using QT?
Forum Update on Monday, May 27th 2025

How to unzip an application running on an Android device using QT?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 2 Posters 550 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.
  • G Offline
    G Offline
    GulsahAkt
    wrote on 30 Oct 2023, 10:21 last edited by
    #1

    Hello, the application I developed in QT runs on Android devices. In other words, QT is actually installed on Linux, but the application is run on an Android device.
    There is a database in the .zip file I downloaded from the server. I need to copy the database by unziping this zip file. I was not successful in the unzip process. I found out that it can't be done with qUnCompress. When I want to use QuaZip, after installing QuaZip-dev, I cannot reference the project with #include<quazip.h>. (quazip.h file not found)
    Can you please help?

    J 1 Reply Last reply 30 Oct 2023, 10:38
    0
    • G GulsahAkt
      30 Oct 2023, 10:21

      Hello, the application I developed in QT runs on Android devices. In other words, QT is actually installed on Linux, but the application is run on an Android device.
      There is a database in the .zip file I downloaded from the server. I need to copy the database by unziping this zip file. I was not successful in the unzip process. I found out that it can't be done with qUnCompress. When I want to use QuaZip, after installing QuaZip-dev, I cannot reference the project with #include<quazip.h>. (quazip.h file not found)
      Can you please help?

      J Online
      J Online
      jsulm
      Lifetime Qt Champion
      wrote on 30 Oct 2023, 10:38 last edited by
      #2

      @GulsahAkt said in How to unzip an application running on an Android device using QT?:

      after installing QuaZip-dev, I cannot reference the project with #include<quazip.h>. (quazip.h file not found)

      You need to tell compiler where to find header files and you have to tell the linker where to find the lib.
      So, did you compile QuaZip for Android?

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

      G 1 Reply Last reply 30 Oct 2023, 11:11
      0
      • J jsulm
        30 Oct 2023, 10:38

        @GulsahAkt said in How to unzip an application running on an Android device using QT?:

        after installing QuaZip-dev, I cannot reference the project with #include<quazip.h>. (quazip.h file not found)

        You need to tell compiler where to find header files and you have to tell the linker where to find the lib.
        So, did you compile QuaZip for Android?

        G Offline
        G Offline
        GulsahAkt
        wrote on 30 Oct 2023, 11:11 last edited by
        #3

        @jsulm said in How to unzip an application running on an Android device using QT?:

        You need to tell compiler where to find header files

        Since quazip is installed on qt linux, I installed quazip-dev from the terminal. Do I need to manually compile Quazip for Android?

        *You need to tell compiler where to find header files
        When I specify where to find the header files as usr/include/quazip, I do not receive an error in the #include line, but when I run my application, I get the error "Undefined reference to 'QuaZip::QuaZip'

        Since I haven't added a Qt 3rd party library before, I'm not sure if I might have done something wrong, I'm sorry. But should I download QuaZip, compile QuaZip with the .pro extension file, and then add the library to LIBS in .pro in my own project?

        J 1 Reply Last reply 30 Oct 2023, 12:28
        0
        • G GulsahAkt
          30 Oct 2023, 11:11

          @jsulm said in How to unzip an application running on an Android device using QT?:

          You need to tell compiler where to find header files

          Since quazip is installed on qt linux, I installed quazip-dev from the terminal. Do I need to manually compile Quazip for Android?

          *You need to tell compiler where to find header files
          When I specify where to find the header files as usr/include/quazip, I do not receive an error in the #include line, but when I run my application, I get the error "Undefined reference to 'QuaZip::QuaZip'

          Since I haven't added a Qt 3rd party library before, I'm not sure if I might have done something wrong, I'm sorry. But should I download QuaZip, compile QuaZip with the .pro extension file, and then add the library to LIBS in .pro in my own project?

          J Online
          J Online
          jsulm
          Lifetime Qt Champion
          wrote on 30 Oct 2023, 12:28 last edited by
          #4

          @GulsahAkt said in How to unzip an application running on an Android device using QT?:

          Since quazip is installed on qt linux, I installed quazip-dev from the terminal

          And this has nothing to do with Android. You need to build this lib for Android and use that build.
          "Undefined reference to 'QuaZip::QuaZip'" - this has nothing to do with header files, this is an error from the linker. I also wrote before: "and you have to tell the linker where to find the lib"

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

          G 1 Reply Last reply 1 Nov 2023, 11:25
          1
          • J jsulm
            30 Oct 2023, 12:28

            @GulsahAkt said in How to unzip an application running on an Android device using QT?:

            Since quazip is installed on qt linux, I installed quazip-dev from the terminal

            And this has nothing to do with Android. You need to build this lib for Android and use that build.
            "Undefined reference to 'QuaZip::QuaZip'" - this has nothing to do with header files, this is an error from the linker. I also wrote before: "and you have to tell the linker where to find the lib"

            G Offline
            G Offline
            GulsahAkt
            wrote on 1 Nov 2023, 11:25 last edited by
            #5

            @jsulm And finally I was able to get it working. Thank you very much for your help @jsulm, it was thanks to you. If anyone has problems like me, here's what I did: I compiled quazip for android, and a video was very helpful for me (https://www.youtube.com/watch?v=bVqVR2V3n3M&t=56s). In addition to the steps in this video, quazip .pro for android. I added this part.
            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
            }
            Then I compiled the quazip application and referenced the resulting libquazip.so file to my project and the result was successful.

            1 Reply Last reply
            0
            • G GulsahAkt has marked this topic as solved on 1 Nov 2023, 11:26
            • G GulsahAkt referenced this topic on 1 Nov 2023, 11:34

            3/5

            30 Oct 2023, 11:11

            • Login

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