i can't built a simple locale from_utf using example with my own build
boost 1.84.0
[system]
SUSE Tumbleweed
gcc (SUSE Linux) 13.2.1 20240206 [revision
67ac78caf31f7cb3202177e6428a46d829b70f23]
[boost build]
using
https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_...
tar -xf boost_1_84_0.tar.bz2
cd boost_1_84_0
./bootstrap.sh --prefix=/home/test/boost_1_84_0_install
./b2 install
----
[CMakeLists.txt]
cmake_minimum_required (VERSION 3.14)
project (MyTest)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
list(APPEND CMAKE_PREFIX_PATH "/home/test/boost_1_84_0_install/lib/cmake")
find_package( Boost REQUIRED COMPONENTS locale )
add_executable( my_test main.cpp)
target_link_libraries( my_test PRIVATE Boost::boost )
----
[main.cpp]
#include
int main()
{
auto x = boost::locale::conv::from_utf( "blun", "ISO-8859-1" );
return 0;
}
----
build:
_build>cmake ../MyTest
_build>make
[ 50%] Building CXX object CMakeFiles/my_test.dir/main.cpp.o
[100%] Linking CXX executable my_test
/usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld:
CMakeFiles/my_test.dir/main.cpp.o: in function
`std::__cxx11::basic_string boost::locale::conv::from_utf<char>(char const*,
std::__cxx11::basic_string const&, boost::locale::conv::method_type)':
main.cpp:(.text._ZN5boost6locale4conv8from_utfIcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKT_RKS8_NS1_11method_typeE[_ZN5boost6locale4conv8from_utfIcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKT_RKS8_NS1_11method_typeE]+0x42):
undefined reference to `std::__cxx11::basic_string
boost::locale::conv::from_utf<char>(char const*, char const*,
std::__cxx11::basic_string const&, boost::locale::conv::method_type)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/my_test.dir/build.make:97: my_test] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/my_test.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
any idea what is happening here?