简体   繁体   中英

Using libzip library from Visual Studio 2017 and cmake

I have a c++ program that was originally written in Linux. The program uses functions from the library libzip:

https://libzip.org

I am now working on a windows-based platform in Visual Studio 2017. Everthing works, as I could basically use the same cmake-files as I used on the Linux-platform. However, in Linux I used the package manager to install libzip. I do not have that option in Windows. I somehow need to build a Windows-version for libzip and include the files (header files and lib files) in my CMakeLists.txt file. Can someone help me with a step-by-step guide for this?

Take a look at vcpkg . It is a package manger for the Windows platform. It builds and installs many open source libraries for Windows. libzip is mentioned specifically as one of the ports.

Is it possible for you to use the Nuget Package Manager within Visual Studio?

  1. right click on your solution
  2. select "Manage packages for your solution"
  3. search for libzip
  4. select lipzip and click install
  5. you should now be able to #include "zip.h"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM