- Building libzip with MinGW-W64, QuentinC (2020/03/08 17:08:01)
Hello,I were looking for a library able to read and write AES-encrypted zip files for a C++ project, and libzip seems to be pretty good and quite simple to use. However, I have issues building it with MinGW-W64 on windows. Can you help me ?
First of all, please don't tell me to use Visual Studio. I have had bad experience with it in the past and so I want to avoid it. I want to stick to MinGW.
Secondly, I need to tell you that I don't know anything about cmake, what it does, and don't want to care at all about it. Libzip requires it, so I have just downloaded the latest binary version without asking another question. I'm tired about the need to download tools that are used to build other tools and that finally never work, but well; libzeep seem to be pretty nice, I really want to try it out.
I'm on windows 10 64 bits, but am compiling with MinGW-W64 32 bit version because many people are still using 32 bit computers. The goal at the moment is just to build libzip and the examples. I'll see how and if I can use libzip in my project later on, once I'm able to experiment a little with the library.
Below are the commands I ran and the parts of the output I feel interesting to show, as well as my observations/trials so far.
Thank you very much for your answers. > cmake --version cmake version 3.16.5 CMake suite maintained and supported by Kitware (kitware.com/cmake). > g++ --version g++ (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 8.1.0 Copyright (C) 2018 Free Software Foundation, Inc.# Now running cmake. OK, this tool seem not to auto-detect that I'm using MinGW, and that zlib and openssl are in the default include directory but OK, I juste have to explicitly tell it.
> cmake -G "MinGW Makefiles" -Wno-dev -DZLIB_INCLUDE_DIR=C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\i686-w64-mingw32\include -DOPENSSL_INCLUDE_DIR=C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\i686-w64-mingw32\include
-- The C compiler identification is GNU 8.1.0 .
Made by MHonArc.