
On 10/09/2025 22:21, Lipódi László via Boost-users wrote:
Dear Boost::regex_icu users!
I've ran into a problem while using the regex library of Boost with ICU compatibility mode. I am getting a lot of linker errors about ICU functions. This is all the linker errors I get: https://pastebin.com/eCj8Pi2m I am pretty sure that I'm getting this while using `boost::u32regex_token_iterator`.
I'm using CMake to build my project and CPM (A wrapper around FetchContent).
Here is my CMakeLists.txt:
``` cmake_minimum_required(VERSION 3.12) project(termeszetes_nyelvi)
include(cmake/CPM.cmake)
set(CMAKE_CXX_STANDARD 26) set(BOOST_REGEX_STANDALONE ON)
set(ICU_ROOT "C:/Program Files/icu")
CPMAddPackage("gh:boostorg/regex#boost-1.89.0")
add_executable(termeszetes_nyelvi main.cpp regex_utils/regex_match_collector.hpp regex_utils/split_string_using_regex.hpp print_utils/format_map.hpp) target_link_libraries(termeszetes_nyelvi PRIVATE Boost::regex_icu)```
I have tried linking to all ICU components, but it did not resolve my errors.
Your linker error is definitely from ICU: I believe the first of the errors relates to the contents of icuin.dll linked to via icuin.lib. However, I know nothing about CMake so your problem likely comes from there... John.