English 中文(简体)
当将 libxml2 包含在外部图书馆和机器人 ddk 中时, 未定义的引用错误
原标题:Undefined reference errors when including external library libxml2 in android ndk

我试图使用 libxml2 与和 Roidndk 。 当我运行文件时, 我发现错误, 说 Unicode/ ucnv.h 文件不存在。 我见过 Unicode/ ucnv.h 包含在其中一个文件中, 没有这样的页眉文件 。 因此我下载了 < a href=> http://site.icu- project.org/ " rel=" nofolp" 文件, http://site.icu- project.org/ < /a> 并把它们放入文件夹中。

上一个错误已删除, 但我有这些错误 。

分享图书馆:libxml2.so

./obj/local/armeabi/objs-debug/xml2/encoding.o: In function `openIcuConverter :
C:	esthello-jni/jni/encoding.c:109: undefined reference to `ucnv_open_49 
C:	esthello-jni/jni/encoding.c:115: undefined reference to `ucnv_setToUCallBack_49 
C:	esthello-jni/jni/encoding.c:119: undefined reference to `ucnv_setFromUCallBack_49 
C:	esthello-jni/jni/encoding.c:126: undefined reference to `ucnv_open_49 
C:	esthello-jni/jni/encoding.c:132: undefined reference to `ucnv_close_49 
C:	esthello-jni/jni/encoding.c:135: undefined reference to `UCNV_TO_U_CALLBACK_STOP_49 
C:	esthello-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:	esthello-jni/jni/encoding.c:141: undefined reference to `ucnv_close_49 
C:	esthello-jni/jni/encoding.c:142: undefined reference to `ucnv_close_49 
./obj/local/armeabi/objs-debug/xml2/encoding.o: In function `xmlUconvWrapper :
C:	esthello-jni/jni/encoding.c:1865: undefined reference to `ucnv_convertEx_49 
C:	esthello-jni/jni/encoding.c:1870: undefined reference to `ucnv_convertEx_49 

collect2: ld returned 1 exit status make: * [obj/local/armeabi/libxml2.so] Error 1

I didn t find function ucnv_open_49 in any of the files. Am I the only one who is facing this problem?

最佳回答

Build unicode library (icu) along with libxml2 and mention in LOCAL_SHARED_LIBRARIES. That s it!

问题回答

您打算将 libxml2 与 ICU 连接起来( 例如, 将其用于转换) 吗? 这是可选的, 但目前您已经启用了 。 这样您需要将 ICU 连接在一起, 也可以是静态或动态的 。 请参见 libxml2 s 配置脚本的选项 。 其中一些是图标v, 如果您只打算与 UTF-8 合作, 则甚至没有转换器 。





相关问题
What s wrong with this eval statement in Perl?

What s wrong with this eval statement in Perl? I m trying to check that the XML is valid by catching any exceptions thrown from the parsing of the file with XML::LibXML: use XML::LibXML; my $...

Install libxml2 and associated python bindings - Windows

I am attempting to install libxml2 so that I can setup the python bindings and eventually use lxml. However I am unable to work out here on earth I am supposed to be unzipping the files. I haven t ...

iPhone - does TouchXML use an undocumented APIs?

Recently I ve heard that Apple is using tools to search for references to undocumented APIs and are rejecting iPhone apps from the App Store because of it. The popular Three20 framework is causing ...

Python XPath Result displaying only []

Hey I have just started to use Python recently and I want to use it with a bit of xPath, the thing is when I print the result of the query I only get [] and I don t know why =S import libxml2, ...

热门标签