This is a fork of lib7zip.

Differences from the base

The differences are that cmake is used instead of autotools: cmake does not build the tests (yet). cmake does not automatically get the p7zip/7zip source from the P7Zip

NO_ERROR is not used to designate a "success' error-code, C7Z_NO_ERROR is used instead.

Instead of redefining the PropertyID enum (partially) and mapping between them with switch/case, I just use the PropID.h defined as part of 7zip. that header is then packaged with source. This means all properties are available from GetPropertyAsType functions.

Code-Style improvements, trailing whitespace removed, and leading whitespace normalized to tabs.

Updated version info. calling this 1.7 since code made to work with 1.6 will need to be changed.

NOTE: for the moment it is not recommended to use this version.


  1. Download source code and extract
  2. Install gcc & g++, for windows this means installing MinGW
  3. Install cmake
  4. Download p7zip source for non-windows or 7-zip source for Windows and extract.
  5. Copy or move the C and CPP directories from p7zip or 7zip into lib7zip-version/includes
  6. open a terminal or cmd.exe and cd to the lib7zip folder.
  7. run for linux $ cmake . and on windows $ cmake . -G "MinGW Makefiles"
  8. run make (type make and press enter) in the terminal.
  9. run make install to install the libraries & headers

Compiling on windows 64-bit with mingw32-w64

setup-mingw64.bat & mostly left as an exercise to the reader see: for the most helpful links & possibly updates (I used the 32-bit mingw & cmake that are part of choclatey)