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?

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

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 2 Posters 534 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 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?

    jsulmJ 1 Reply Last reply
    0
    • G GulsahAkt

      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?

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on 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
      0
      • jsulmJ jsulm

        @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 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?

        jsulmJ 1 Reply Last reply
        0
        • G GulsahAkt

          @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?

          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on 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
          • jsulmJ jsulm

            @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 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
            • G GulsahAkt referenced this topic on

            • Login

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