You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dynamic linkage works fine but uncommenting set(Boost_USE_STATIC_LIBS ON) will result in an error.
The boost library was installed via package manager with sudo apt install libboost-all-dev.
As we can see in the prints I have Locale installed and also the icu stuff.
ldd of the binary if not statically linked.
I can statically link other boost libraries, but locale in specific gives me an error.
As the errors are all of "undefined reference to " you need to link to the ICU target. In particular icudata, icui18n, icuuc, e.g. by using find_package(ICU ...) and the targets ICU:data ICU::i18n ICU::uc
This is done automatically for shared libraries in general. Boost 1.75 config files add those dependencies too in all cases. So upgrading to Boost 1.75 or newer will also solve this.
Side note:
find_package(Boost COMPONENTS locale REQUIRED)
# This is redundant due to the above REQUIRED
if(NOT Boost_FOUND)
message(FATAL_ERROR "Some Boost libraries missing in the system")
endif()
Trying to statically link Boost Locale with cmake returns an error.
CMakeLists.txt
main.cpp
Dynamic linkage works fine but uncommenting
set(Boost_USE_STATIC_LIBS ON)
will result in an error.The boost library was installed via package manager with
sudo apt install libboost-all-dev
.As we can see in the prints I have Locale installed and also the icu stuff.
ldd
of the binary if not statically linked.I can statically link other boost libraries, but locale in specific gives me an error.
Output of the
make
command: log.txtUbuntu version:
20.04
and22.04
Cmake version: >=
3.16
Boost version:
1.71
and1.74
g++ version:
10.3
and11.3
The text was updated successfully, but these errors were encountered: