Error: Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

450 views
Skip to first unread message

Rizwan Syed

unread,
Jul 1, 2021, 5:12:45 PM7/1/21
to Protocol Buffers
OS: Microsoft Windows 10 Pro

When running 

```
 C:\Path\to\protobuf\cmake\build>mkdir release & cd release
 C:\Path\to\protobuf\cmake\build\release>cmake -G "NMake Makefiles" ^
 -DCMAKE_BUILD_TYPE=Release ^
 -DCMAKE_INSTALL_PREFIX=../../../../install ^
 ../..
```

in `protobuf-3.17.3\cmake\build\release>` via the MSVC Developer Command Prompt the following error is outputted: 

`Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)`

I am running this inside the unzipped "protobuf-cpp-3.17.3.tar.gz"  file. 

I am following the instructions at protobuf/README.md at master · protocolbuffers/protobuf (github.com)  under the subheading "CMake Configuration".

I am following them from top to bottom, so I haven't built the solution file ` protobuf.sln ` yet.

Does anyone know of any solutions for this problem? 

Thanks
Reply all
Reply to author
Forward
0 new messages