AlmondPudding
AlmondPudding

Reputation: 29

Install zlib library on Windows for MSVC

I'd like to compile (using MSVC 2022) some third party project (fteqw) that depends on zlib library. First to generate a solution to open in MSVC i'm using the cmake from the Visual Studio 2022 Developer Command Prompt. I'm getting an error:

The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZLIB_LIBRARY
    linked by target "qtv" in directory D:/Pobrane/fteqw-master

I guess the zlib library is just missing. The question is there a way to install zlib package from Visual Studio 2022 Developer Command Prompt like on Linux system using apt-get, yum, etc.?

Upvotes: 0

Views: 165

Answers (2)

CristiFati
CristiFati

Reputation: 41147

Another method (lower level and also more complicated) would be to:

Upvotes: 0

Minxin Yu - MSFT
Minxin Yu - MSFT

Reputation: 4259

Make sure vcpkg is installed in Visual Studio Installer. Use command vcpkg install zlib.

Install In classic mode, run the following vcpkg command:
vcpkg install zlib

In manifest mode, run the following vcpkg command in your project directory:

vcpkg add port zlib

Reference: vcpkg in CMake projects

Use vcpkg

Upvotes: 1

Related Questions