-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++] Linking error with pre-built Boost binaries on Windows #45614
Comments
cc @kou |
Where did you download pre-built Boost binaries? https://sourceforge.net/projects/boost/files/boost-binaries/1.87.0/ ? It seems that Could you share full |
Here is the cmake log: https://gist.github.com/pitrou/0dc9dce94685caf4e9d75d00810da263 |
I've tried with 1.86.0 instead and got the same error... |
Thanks. Could you try this? diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index f2500b3a72..10f54bcd57 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -71,6 +71,13 @@ if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
+# https://cmake.org/cmake/help/latest/policy/CMP0167.html
+#
+# Use Boost's CMake packages instead of FindBoost.cmake in CMake.
+if(POLICY CMP0167)
+ cmake_policy(SET CMP0167 NEW)
+endif()
+
# https://cmake.org/cmake/help/latest/policy/CMP0170.html
#
# CMP0170 is for enforcing dependency populations by users with |
I'm trying this out. It seems it may be desirable to also enable https://cmake.org/cmake/help/latest/policy/CMP0144.html ? |
Okay, building seems to work with:
|
You need to add All DLLs must be in |
Describe the bug, including details regarding any error messages, version, and platform.
Using pre-built Boost binaries on Windows, I get this linker error:
This was with the command line:
Yet the file exists:
Component(s)
C++
The text was updated successfully, but these errors were encountered: