Closed lavancig closed 2 years ago
To anyone that might have the same issue, compiling it as a static library works: cmake .. -DPAGMO_WITH_EIGEN3=ON -DPAGMO_BUILD_STATIC_LIBRARY=ON
It seems the issue is related to auto-linking boost libraries, and using the following define fixes the issue: add_definitions( -DBOOST_ALL_NO_LIB )
@lavancig did you build Boost as static or dynamic libraries?
I used the installer for the boost libraries on windows (I did not build from the source). This installer includes both static and dynamic boost libraries.
@lavancig our Windows testing pipeline uses conda to manage the dependencies. You can see the installation script here:
https://github.com/esa/pagmo2/blob/master/tools/gha_windows-2016.ps1
With this setup we successfully build against the shared Boost libraries.
I will close this report for now, as it seems like the situation is solved. Please re-open if needed.
Compilation works ok, but the linker cannot find boost.
Running CMake with boost debug flag:
When compiling with --verbose flag set, the last step results in:
The file it claims to be missing "libboost_serialization-vc141-mt-gd-x64-1_75.lib" exists in the folder that findBoost found, as is the file used by the linker "C:\local\boost_1_75_0\lib64-msvc-14.1\boost_serialization-vc141-mt-gd-x64-1_75.lib" (Notice the different prefix).