我正在尝试将 libxml2 与 android ndk 一起使用。当我运行 make 文件时,我收到错误说文件 'unicode/ucnv.h' 不存在。我已经看到“unicode/ucnv.h”包含在其中一个文件中,并且不存在这样的头文件。所以我从http://site.icu-project.org/下载了 unicode 头文件并将它们放在包含文件夹中。
现在以前的错误消失了,但我遇到了这些错误。
共享库:libxml2.so
./obj/local/armeabi/objs-debug/xml2/encoding.o: In function `openIcuConverter':
C:\test\hello-jni/jni/encoding.c:109: undefined reference to `ucnv_open_49'
C:\test\hello-jni/jni/encoding.c:115: undefined reference to `ucnv_setToUCallBack_49'
C:\test\hello-jni/jni/encoding.c:119: undefined reference to `ucnv_setFromUCallBack_49'
C:\test\hello-jni/jni/encoding.c:126: undefined reference to `ucnv_open_49'
C:\test\hello-jni/jni/encoding.c:132: undefined reference to `ucnv_close_49'
C:\test\hello-jni/jni/encoding.c:135: undefined reference to `UCNV_TO_U_CALLBACK_STOP_49'
C:\test\hello-jni/jni/encoding.c:135: undefined reference to `UCNV_FROM_U_CALLBACK_STOP_49'
./obj/local/armeabi/objs-debug/xml2/encoding.o: In function `closeIcuConverter':
C:\test\hello-jni/jni/encoding.c:141: undefined reference to `ucnv_close_49'
C:\test\hello-jni/jni/encoding.c:142: undefined reference to `ucnv_close_49'
./obj/local/armeabi/objs-debug/xml2/encoding.o: In function `xmlUconvWrapper':
C:\test\hello-jni/jni/encoding.c:1865: undefined reference to `ucnv_convertEx_49'
C:\test\hello-jni/jni/encoding.c:1870: undefined reference to `ucnv_convertEx_49'
collect2: ld 返回 1 退出状态 make: * [obj/local/armeabi/libxml2.so] 错误 1
我在任何文件中都没有找到函数 ucnv_open_49。我是唯一一个面临这个问题的人吗?