Windows Installation: Or tools throwing errors with CMake

354 views
Skip to first unread message

AKASH GUPTA

unread,
Jul 18, 2022, 1:24:34 AM7/18/22
to or-tools-discuss
Hello Everyone, I have been trying to run OR tools on my Windows machine. I have currently installed Cmake for the building process as the default Makefile is not working with C++ on windows. However, Whenever I try to run


C:\Users\Akash-OMEN\Desktop\or-tools_VisualStudio2022-64bit_v9.3.10497>cmake C:\Users\Akash-OMEN\Desktop\or-tools_VisualStudio2022-64bit_v9.3.10497

The code runs but finally, I get this error:


CMake Error at C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.3")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.24/Modules/FindZLIB.cmake:150 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/deps.cmake:13 (find_package)
CMakeLists.txt:292 (include)


-- Configuring incomplete, errors occurred!
See also "C:/Users/Akash-OMEN/Desktop/or-tools_VisualStudio2022-64bit_v9.3.10497/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Akash-OMEN/Desktop/or-tools_VisualStudio2022-64bit_v9.3.10497/CMakeFiles/CMakeError.log".






I have tried to add zlib and zlib_dir but everytime I run the code it throws me the same error again
I need help with this error. Please send me some help

Mizux Seiha

unread,
Jul 19, 2022, 4:45:25 AM7/19/22
to or-tools-discuss
strange the make should work, I'll be happy to have a detailled bug report...
 BTW you should take a look of the CMAKE options
-> https://github.com/google/or-tools/tree/stable/cmake#options
so you can let or-tools build zlib for you instead of trying to find it in your system (which seems not here e.g. you install it using vcpkg or chocolatey)
using -DBUILD_DEPS=ON so your cmake command should be

cmake -S. -Bbuild -DBUILD_DEPS=ON
then
cmake --build build -j 4

Reply all
Reply to author
Forward
0 new messages