Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QuaZip - Undefined Reference
Qt 6.12 LTS is out! See what's new in the release blog

QuaZip - Undefined Reference

Scheduled Pinned Locked Moved Solved General and Desktop
33 Posts 5 Posters 12.2k Views 2 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.
  • FluentCodingF FluentCoding

    @mrjj Thats perfect, thanks! I only need it for zip iirc.

    mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #17

    @FluentCoding
    Ok :)
    Do note.

    It has no recursive function to add all files in all folders but using Qt that is not hard to add.

    I tested it with a 1 GB zip file which it handled ok. I cannot say for larger.

    It does not support 64 bit zip file so if you get yours from an external source it might be an issue.

    1 Reply Last reply
    0
    • FluentCodingF Offline
      FluentCodingF Offline
      FluentCoding
      wrote on last edited by
      #18

      Oh aight. Btw is it possible to open a zip file from a QByteArray (from memory generally)? @mrjj

      mrjjM 1 Reply Last reply
      0
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #19

        @FluentCoding said in QuaZip - Undefined Reference:

        Btw is it possible to open a zip file from a QByteArray (from memory generally)?

        yes

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        FluentCodingF 1 Reply Last reply
        1
        • Christian EhrlicherC Christian Ehrlicher

          @FluentCoding said in QuaZip - Undefined Reference:

          Btw is it possible to open a zip file from a QByteArray (from memory generally)?

          yes

          FluentCodingF Offline
          FluentCodingF Offline
          FluentCoding
          wrote on last edited by
          #20

          @Christian-Ehrlicher How, if I may ask? I haven't found the appropiate method for that.

          1 Reply Last reply
          0
          • FluentCodingF FluentCoding

            Oh aight. Btw is it possible to open a zip file from a QByteArray (from memory generally)? @mrjj

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #21

            @FluentCoding
            Hi
            Yes it can be both memory and file-based
            see section
            Extract a zip entry into memory using callback.

            FluentCodingF 1 Reply Last reply
            0
            • FluentCodingF Offline
              FluentCodingF Offline
              FluentCoding
              wrote on last edited by
              #22
              This post is deleted!
              1 Reply Last reply
              0
              • mrjjM mrjj

                @FluentCoding
                Hi
                Yes it can be both memory and file-based
                see section
                Extract a zip entry into memory using callback.

                FluentCodingF Offline
                FluentCodingF Offline
                FluentCoding
                wrote on last edited by FluentCoding
                #23

                @mrjj Thanks but I meant from memory, not into memory.

                mrjjM 1 Reply Last reply
                0
                • FluentCodingF FluentCoding

                  @mrjj Thanks but I meant from memory, not into memory.

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #24

                  @FluentCoding
                  if you mean
                  Can i add a buffer to the zip file as was it a file then yes :)

                                  auto bytes = QByteArray::fromRawData(reinterpret_cast<const char *>(memory), int(fileSize32Bit));
                                  zip_entry_write(zip, bytes, fileSize32Bit);
                  
                  
                  1 Reply Last reply
                  1
                  • FluentCodingF Offline
                    FluentCodingF Offline
                    FluentCoding
                    wrote on last edited by FluentCoding
                    #25

                    @mrjj Alright - (hopefully the) last question: How can I create zip_t object without zip_open, so that i only use zip_entry_write to add the buffer? Should I just create an object of the struct zip_t? Also, should I replace fileSize32Bit with the size of the QByteArray?

                    mrjjM 1 Reply Last reply
                    0
                    • FluentCodingF FluentCoding

                      @mrjj Alright - (hopefully the) last question: How can I create zip_t object without zip_open, so that i only use zip_entry_write to add the buffer? Should I just create an object of the struct zip_t? Also, should I replace fileSize32Bit with the size of the QByteArray?

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #26

                      Hi
                      I have not tried that but look in zip.c and

                      struct zip_t *zip_open(const char *zipname, int level, char mode) {
                      
                      

                      I think you can init it up as you like if you follow that code and the various modes + flags.

                      Yes, fileSize32Bit should be the QByteArray size.

                      1 Reply Last reply
                      0
                      • FluentCodingF Offline
                        FluentCodingF Offline
                        FluentCoding
                        wrote on last edited by FluentCoding
                        #27

                        Alright, but I think that I'll try another framework :/ It seems that I can run into problems - im neither sure if the zip files i wanna extract are 32 bit and maybe, I would need to extract a .rar or .7z later. I will give Zipper a try. But thank you very much for your support, @mrjj.

                        mrjjM 1 Reply Last reply
                        0
                        • FluentCodingF FluentCoding

                          Alright, but I think that I'll try another framework :/ It seems that I can run into problems - im neither sure if the zip files i wanna extract are 32 bit and maybe, I would need to extract a .rar or .7z later. I will give Zipper a try. But thank you very much for your support, @mrjj.

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #28

                          @FluentCoding
                          Hi
                          Ok. Please post if you find something good that is easy to compile on windows.
                          Also, could you pos the link for the zlib you used ?
                          I cannot find any MSI and Im still abit hooked on QuaZip :)

                          1 Reply Last reply
                          0
                          • FluentCodingF Offline
                            FluentCodingF Offline
                            FluentCoding
                            wrote on last edited by
                            #29

                            Sure, @mrjj.

                            http://gnuwin32.sourceforge.net/packages/zlib.htm

                            This is the official download page. If you search good enough on the zlib homepage, you'll see that you have to download the binaries from this page.

                            mrjjM 1 Reply Last reply
                            0
                            • FluentCodingF FluentCoding

                              Sure, @mrjj.

                              http://gnuwin32.sourceforge.net/packages/zlib.htm

                              This is the official download page. If you search good enough on the zlib homepage, you'll see that you have to download the binaries from this page.

                              mrjjM Offline
                              mrjjM Offline
                              mrjj
                              Lifetime Qt Champion
                              wrote on last edited by
                              #30

                              @FluentCoding
                              So you took one of these ?

                              alt text

                              1 Reply Last reply
                              0
                              • FluentCodingF Offline
                                FluentCodingF Offline
                                FluentCoding
                                wrote on last edited by FluentCoding
                                #31

                                @mrjj Yeah, the "Complete package, except sources" one.

                                mrjjM 1 Reply Last reply
                                0
                                • FluentCodingF FluentCoding

                                  @mrjj Yeah, the "Complete package, except sources" one.

                                  mrjjM Offline
                                  mrjjM Offline
                                  mrjj
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #32

                                  @FluentCoding
                                  Ok super. The DLL is from 2005.
                                  Will try and see what visual studio thinks of it.

                                  FluentCodingF 1 Reply Last reply
                                  0
                                  • mrjjM mrjj

                                    @FluentCoding
                                    Ok super. The DLL is from 2005.
                                    Will try and see what visual studio thinks of it.

                                    FluentCodingF Offline
                                    FluentCodingF Offline
                                    FluentCoding
                                    wrote on last edited by
                                    #33

                                    @mrjj Alright.

                                    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
                                    • Unsolved