Compress file with QuaZIP

1.3k Views Asked by At

I'm looking for some example to zip files in Qt using QuaZIP. I tried this code but it doesn't work. I received a segmentation fault error.

JlCompress::compressFiles(zipfilename,filenames);//zipfilename is a qstring and filenames a QStringList

Should I open files before compressing them ?

1

There are 1 best solutions below

0
Dababi On

Problem resolved, I removed th quazip installation then I installed it manually:

I downloaded the source code from http://sourceforge.net/projects/quazip/files/latest/download
tar xvfz quazip-0.7.1.tar.gz
cd quazip-0.7.1
qmake "PREFIX=/usr/local" "LIBS+=-lz"
make
make install

After that i installed the libquazip-qt5-* packages using apt get finally i linked quazip in my pro file using

LIBS += -lquazip -lz