Unzip zip files



  • I try to use qzipreader_p.h, qzipwriter_p.h and qzip.cpp from qt/src/gui/text on Macx for unzip files.

    When I add this files to project i see error :-1: error: symbol(s) not found for architecture x86_64

    How i can fix this?



  • I'd guess you're missing the x64 version of the library. Either you're missing the file, or you're missing the linker option to use the lib when creating the binary.



  • I found example for unarchive

    ZipReader cZip(QLatin1String("/Volumes/Macintosh 2/1.zip"));
      if (cZip.exists()) {
          qDebug() << "Number of items in the zip archive =" << cZip.count();
          foreach (ZipReader::FileInfo info, cZip.fileInfoList()) {
              if(info.isFile)
                  qDebug() << "File:" << info.filePath << info.size;
              else if (info.isDir)
                  qDebug() << "Dir:" << info.filePath;
              else
                  qDebug() << "SymLink:" << info.filePath;
          }
          cZip.extractAll("/Volumes/Macintosh 2/1/");
      }
    

    I see list of files in console, but the files is not extracts :((((((

    What is wrong?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.