使用 icu 库时,使用 make 进行编译时会出现对“uregex_groupCount_48”的未定义引用

Using the icu library, an undefined reference to 'uregex_groupCount_48' appears when compiling with make

提问人:long yang 提问时间:8/23/2023 更新时间:8/23/2023 访问量:22

问:

ICU版本:4.8.1 使用 autoconf 和 automake 进行编译 使用动态库:LDFLAGS= -licui18n -licuuc -licudata 添加头文件:-I${ICU_ROOT}/unicode/include

${ICU_ROOT} 是我使用 ./configure --prefix=..... 的文件路径存储 ICU 编译。

我在我的项目中使用了uregex_groupCount函数,当我编译它时它出现对“uregex_groupCount_48”的未定义引用。然后我发现在urename.h文件中有关于函数名称替换的宏。

例如:#define uregex_groupCount U_ICU_ENTRY_POINT_RENAME(uregex_groupCount) U_ICU_ENTRY_POINT_RENAME(x) x ## _48

因此,最终项目中的函数名称将替换为带有 _48 后缀的名称。我想知道如何解决这个问题。

编译器错误 undefined-reference autoconf automake icu

评论


答: 暂无答案