Zlib, Libzip, LIBZIPPP Library Compilation (Windows + CMake + vs2013)

Source: Internet
Author: User

"Libzipp" This library is based on "Libzip" is encapsulated, and "Libzip" is based on the "zlib" library encapsulation, so to compile "Libzipp" library will have to compile the other two libraries first.
Download Preparation:
"Zlib-1.2.8.tar.gz"
"Libzip-1.0.1.tar.gz"
"Libzippp-master.zip"




Compilation environment: CMake + vs2013, installation of CMake and "VS2013 x86 native tool command Prompt" tool (already available when installing vs2013)
Command-line environment using [VS2013 x86 native Tools command Prompt], "Start", "Visual Studio", "Visual Studio Tools", "VS2013 x86 native tools command Prompt"


Here is the compilation process, which records the detailed process for forgetting:


First, compile the zlib library
1, the extracted "zlib-1.2.8" folder Copy to "E:\BuildWorkspace\";
2, command line into this path, command: [mkdir build] (Create a build folder);
3. Enter the "Build" folder you just created, command: [CMake.-G "Visual Studio 9"-dcmake_install_prefix= "INSTALL"] (build project)
4, in the "Build" directory under the project file, open the project, compile "All_build" project build library files, compile "INSTALL" project, will execute the project directory "Cmake_install.cmake" script, and finally in the "build" directory Generated " Install folder, header files, library files, etc. are all within the folder.


Second, compile the Libzip library
1, the extracted "libzip-1.0.1" folder Copy to "E:\BuildWorkspace\";
2, command line into this path, command: [mkdir build] (Create a build folder);
3. Enter the "Build" folder you just created, command: [CMake.-G "Visual Studio 9"-dcmake_prefix_path= ". /zlib-1.2.8/build/install "] (construction project)
4, in the "Build" directory has a project document, open the project, compile "All_build" project, here on the error (at least I am here is an error);
5, the "Libzippp-master\lib\libzip-1.0.1-windows-patch.zip" compressed files extracted, according to the same name folder to replace the corresponding files, in the implementation of the 4th step, OK;
6, at this time if directly compiled "INSTALL" project, will be generated to the C packing directory "C:/Program Files (x86)/libzip" folder, in order to allow it to generate "Build\install", here need to modify the project directory "Cmake_ Install.cmake "The 5th line of the script file:
"Set (Cmake_install_prefix" C:/Program Files (x86)/libzip ")" changed to
"Set (Cmake_install_prefix" E:\buildworkspace\libzip-1.0.1\build/install ")",
7, compile "INSTALL"->OK;


Third, compile the LIBZIPPP library
1. Copy the extracted "Libzippp-master" folder to "E:\BuildWorkspace\";(P S: the fifth step in compiling the Libzip library above is to find the "libzippp-master\lib\" in this folder. Libzip-1.0.1-windows-patch.zip ")
2, command line into this path, command: [mkdir build] (Create a build folder);
3, in order to facilitate LIBZIPPP project dependencies, too lazy to modify, directly according to the author's meaning, the above "libzip-1.0.1" and "zlib-1.2.8" folder entire copy to "E:\BuildWorkspace\libzippp-master\ Lib\ "directory (currently, provided that the above compilation has been completed);
4. Enter the "Build" folder you just created, command: [CMake.-G "Visual Studio"-dcmake_prefix_path= "Lib/zlib-1.2.8/build/install"] (build project)
5, in the "Build" directory has a project file, open the project, compile "All_build" project, ok!


PS: Measured, with VS2008 use this library will have a problem (perhaps because it is compiled with vs2013 sake), and then simply use the LIBZIPPP class file, not compiled into the library to use, ok!

Zlib, Libzip, LIBZIPPP Library Compilation (Windows + CMake + vs2013)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.