NDK建造:未定义参考..错误时,静态链接到libxml.a [英] ndk-build: undefined reference to .. errors when statically linking to libxml.a
问题描述
我得到了很多不确定的参考...错误,当我使用NDK,构建工具编译我的一个C ++源文件。为了记录我使用NDK R6在Linux主机系统上。
I get a lot of undefined reference to ... errors when I compile my single c++ source-file using the ndk-build tool. For the record I use NDK r6 on a linux host system.
首先,我一直在敲我的头靠在这个问题一整天,所以我很抱歉,如果我要离开一些东西或解释自己有点快。请问我的任何其他信息。
First of all I've been banging my head against this problem all day, so I am sorry if I am leaving something out or explaining myself a bit fast. Please ask me for any additional information.
我的源 - code有很多,我想静态链接到相关的库。 我已经定义了不同的我所有的依赖库在我的Android.mk文件,如下所示:
My source-code has a lot of dependent libraries that I want to statically link to. I have defined all my dependent libs of different in my Android.mk file as follows:
include $(CLEAR_VARS)
LOCAL_MODULE := <name>
LOCAL_SRC_FILES := lib<name>.a
LOCAL_EXPORT_C_INCLUDES := <header files related to this lib>
include $(PREBUILT_STATIC_LIBRARY)
虽然我确保这些都可以在我的JNI /文件夹lib.a我的Android.mk和Application.mk文件。 (和我的源文件)
= stlport_static 来我Application.mk文件:另外我加入 APP_STL加入STL的支持。
我的一个源文件(riidr-jni.cpp)是目前:
While I make sure that these are available in my jni/ folder as lib.a with my Android.mk and Application.mk files. (and my source file)
Also I've added STL support by adding APP_STL := stlport_static
to my Application.mk file.
My single source file (riidr-jni.cpp) is at the moment:
#include <string>
#include <jni.h>
#include <android/log.h>
#include "../com_riidr_apps_reader_RiidrEbookReaderActivity.h"
#include <dp_all.h>
void Java_com_riidr_apps_reader_RiidrEbookReaderActivity_init ( JNIEnv* env, jobject thiz ) {
__android_log_write(ANDROID_LOG_INFO, "Riidr", "JNI init - start");
dp::platformInit( dp::PI_DEFAULT );
}
如果我取消注释 DP :: platformInit(DP :: PI_DEFAULT);
行并用的std ::字符串测试=ASD取代;
我都没有错误,这让我相信,因此STL LIB导入正确和链接
If I uncomment the dp::platformInit( dp::PI_DEFAULT );
line and replace it with std::string test = "asd";
I have no errors at all, this makes me believe that the and therefore STL lib is correctly imported and linked.
我的Android.mk文件的最后指令是这样
The last instructions of my Android.mk file is this
include $(CLEAR_VARS)
LOCAL_MODULE := riidr-jni
LOCAL_SRC_FILES := riidr-jni.cpp
LOCAL_LDLIBS := -llog -ldl -lz
LOCAL_STATIC_LIBRARIES := \
hobbes \
dp \
adept \
mschema \
hobbes \
t3 \
xml \
mschema \
dp \
adept \
xml \
cryptopenssl \
fonts \
png \
jpeg \
ssl \
crypto \
expat \
cts \
hyphen \
curl
include $(BUILD_SHARED_LIBRARY)
运行NDK,构建工具时,我得到的错误是:
The error I get when running the ndk-build tool is the following:
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上的std :: _ Rb_tree_iterator&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &GT; ::符++():
xpath_context.cpp:(.text._ZNSt17_Rb_tree_iteratorISt4pairIKN3uft5ValueEPN5xpath14DynamicContextEEEppEv[std::_Rb_tree_iterator<std::pair<uft::Value常量,的XPath :: DynamicContext *&GT; &GT; ::符++()] + 0x1C处):未定义参照
的std :: _ Rb_tree_increment(标准:: _ Rb_tree_node_base *)'
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上的std :: _ Rb_tree&LT; UFT ::价值的std ::对&LT ; UFT ::值常量,的XPath :: DynamicContext *&gt;中的std :: _ Select1st&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &gt;中的XPath ::语境:: ValueCompare,性病::分配器&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &GT; &GT; ::擦除(的std :: _ Rb_tree_iterator&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT;&GT;):
xpath_context.cpp:(.text._ZNSt8_Rb_treeIN3uft5ValueESt4pairIKS1_PN5xpath14DynamicContextEESt10_Select1stIS7_ENS4_7Context12ValueCompareESaIS7_EE5eraseESt17_Rb_tree_iteratorIS7_E[std::_Rb_tree<uft::Value,的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&gt;中的std :: _ Select1st&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &gt;中的XPath ::语境:: ValueCompare,性病::分配器&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &GT; &GT; ::擦除(的std :: _ Rb_tree_iterator&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT;&GT;)] + 0x28):未定义参照
的std :: _Rb_tree_rebalance_for_erase(STD :: _ Rb_tree_node_base *的std :: _ Rb_tree_node_base和放大器;)
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上的std :: _ Rb_tree&LT; UFT ::价值的std ::对&LT ; UFT ::值常量,的XPath :: DynamicContext *&gt;中的std :: _ Select1st&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &gt;中的XPath ::语境:: ValueCompare,性病::分配器&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &GT; &GT; :: _ M_insert_(标准:: _ Rb_tree_node_base常量*,性病:: _ Rb_tree_node_base常量*,性病::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT;常量和放大器;):
xpath_context.cpp:(.text._ZNSt8_Rb_treeIN3uft5ValueESt4pairIKS1_PN5xpath14DynamicContextEESt10_Select1stIS7_ENS4_7Context12ValueCompareESaIS7_EE10_M_insert_EPKSt18_Rb_tree_node_baseSG_RKS7_[std::_Rb_tree<uft::Value,的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&gt;中的std :: _ Select1st&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &gt;中的XPath ::语境:: ValueCompare,性病::分配器&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &GT; &GT; :: _ M_insert_(标准:: _ Rb_tree_node_base常量*,性病:: _ Rb_tree_node_base常量*,性病::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT;常量和放大器;)] + 0xc4):未定义参照
的std :: _ Rb_tree_insert_and_rebalance(布尔,性病:: _ Rb_tree_node_base *的std :: _ Rb_tree_node_base *的std :: _ Rb_tree_node_base和放大器;)
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上的std :: _ Rb_tree_const_iterator&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &GT; ::操作符 - ():
xpath_context.cpp:(.text._ZNSt23_Rb_tree_const_iteratorISt4pairIKN3uft5ValueEPN5xpath14DynamicContextEEEmmEv[std::_Rb_tree_const_iterator<std::pair<uft::Value常量,的XPath :: DynamicContext *&GT; &GT; ::操作符 - ()] + 0x1C处):未定义参照
的std :: _ Rb_tree_decrement(标准:: _ Rb_tree_node_base常量*)'
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上的std :: _ Rb_tree_const_iterator&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &GT; ::符++():
xpath_context.cpp:(.text._ZNSt23_Rb_tree_const_iteratorISt4pairIKN3uft5ValueEPN5xpath14DynamicContextEEEppEv[std::_Rb_tree_const_iterator<std::pair<uft::Value常量,的XPath :: DynamicContext *&GT; &GT; ::符++()] + 0x1C处):未定义参照
的std :: _ Rb_tree_increment(标准:: _ Rb_tree_node_base常量*)'
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上 __ gnu_cxx :: new_allocator&LT; mdom ::节点*&GT; ::分配(无符号整数,无效常量*)':
xpath_context.cpp:(.text._ZN9__gnu_cxx13new_allocatorIPN4mdom4NodeEE8allocateEjPKv[__gnu_cxx::new_allocator<mdom::Node*>::allocate(unsigned INT,无效常量*)] + 0x4c):未定义参照
的std :: __ throw_bad_alloc()
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上 __ gnu_cxx :: new_allocator&LT; mdom ::节点&GT; ::分配(为unsigned int,无效常量*)':
xpath_context.cpp:(.text._ZN9__gnu_cxx13new_allocatorIN4mdom4NodeEE8allocateEjPKv[__gnu_cxx::new_allocator<mdom::Node>::allocate(unsigned INT,无效常量*)] + 0x4c):未定义参照
的std :: __ throw_bad_alloc()
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上的std :: _ Rb_tree_iterator&LT;的std ::对&LT; UFT ::值常量,的XPath :: DynamicContext *&GT; &GT; ::操作符 - ():
xpath_context.cpp:(.text._ZNSt17_Rb_tree_iteratorISt4pairIKN3uft5ValueEPN5xpath14DynamicContextEEEmmEv[std::_Rb_tree_iterator<std::pair<uft::Value常量,的XPath :: DynamicContext *&GT; &GT; ::操作符 - ()] + 0x1C处):未定义参照
的std :: _ Rb_tree_decrement(标准:: _ Rb_tree_node_base *)'
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上的std :: deque的&LT; mdom ::节点,性病::分配器&LT ; mdom ::节点&GT; &GT; :: _ M_new_elements_at_front(unsigned int类型):
xpath_context.cpp:(.text._ZNSt5dequeIN4mdom4NodeESaIS1_EE24_M_new_elements_at_frontEj[std::deque<mdom::Node,的std ::分配器&LT; mdom ::节点&GT; &GT; :: _ M_new_elements_at_front(无符号整型)] +将0x58):未定义参照
的std :: __ throw_length_error(字符常量*)'
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上的std :: deque的&LT; mdom ::节点,性病::分配器&LT ; mdom ::节点&GT; &GT; :: _ M_new_elements_at_back(unsigned int类型):
xpath_context.cpp:(.text._ZNSt5dequeIN4mdom4NodeESaIS1_EE23_M_new_elements_at_backEj[std::deque<mdom::Node,的std ::分配器&LT; mdom ::节点&GT; &GT; :: _ M_new_elements_at_back(无符号整型)] +将0x58):未定义参照
的std :: __ throw_length_error(字符常量*)'
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o):在功能上 __ gnu_cxx :: new_allocator&LT;的std :: _ Rb_tree_node&LT;的std ::对&LT ; UFT ::值常量,的XPath :: DynamicContext *&GT; &GT; &GT; ::分配(unsigned int类型,无效常量*)':
xpath_context.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKN3uft5ValueEPN5xpath14DynamicContextEEEE8allocateEjPKv[__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<uft::Value常量,的XPath :: DynamicContext *&GT; &GT; &GT; ::分配(unsigned int类型,无效常量*)] + 0x4c):未定义参照
的std :: __ throw_bad_alloc()
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_yacc.o):在功能上的std ::名单&LT; UFT ::值*,性病::分配器&LT; UFT ::值*&GT; &GT; :: _ M_insert(的std :: _ List_iterator&LT; UFT ::值*&gt;中UFT ::值*常量和放大器;):
xpath_yacc.cpp:(.text._ZNSt4listIPN3uft5ValueESaIS2_EE9_M_insertESt14_List_iteratorIS2_ERKS2_[std::list<uft::Value*,的std ::分配器&LT; UFT ::值*&GT; &GT; :: _ M_insert(的std :: _ List_iterator&LT; UFT ::值*&gt;中UFT ::值*常量和放大器;)] + 0x3C符号):未定义参照
的std :: _ List_node_base ::钩(的std :: _ List_node_base *)'
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_yacc.o):在功能上 __ gnu_cxx :: new_allocator&LT;的std :: _ List_node&LT; UFT ::值*&GT; &GT; ::分配(unsigned int类型,无效常量*)':
xpath_yacc.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPN3uft5ValueEEE8allocateEjPKv[__gnu_cxx::new_allocator<std::_List_node<uft::Value*> &GT; ::分配(unsigned int类型,无效常量*)] + 0x4c):未定义参照
的std :: __ throw_bad_alloc()
collect2:劳工处返回1退出状态
令: * 的[/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libriidr-jni.so]错误1
/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In function
std::_Rb_tree_iterator<std::pair<uft::Value const, xpath::DynamicContext*> >::operator++()': xpath_context.cpp:(.text._ZNSt17_Rb_tree_iteratorISt4pairIKN3uft5ValueEPN5xpath14DynamicContextEEEppEv[std::_Rb_tree_iterator<std::pair<uft::Value const, xpath::DynamicContext*> >::operator++()]+0x1c): undefined reference to
std::_Rb_tree_increment(std::_Rb_tree_node_base*)' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In functionstd::_Rb_tree<uft::Value, std::pair<uft::Value const, xpath::DynamicContext*>, std::_Select1st<std::pair<uft::Value const, xpath::DynamicContext*> >, xpath::Context::ValueCompare, std::allocator<std::pair<uft::Value const, xpath::DynamicContext*> > >::erase(std::_Rb_tree_iterator<std::pair<uft::Value const, xpath::DynamicContext*> >)': xpath_context.cpp:(.text._ZNSt8_Rb_treeIN3uft5ValueESt4pairIKS1_PN5xpath14DynamicContextEESt10_Select1stIS7_ENS4_7Context12ValueCompareESaIS7_EE5eraseESt17_Rb_tree_iteratorIS7_E[std::_Rb_tree<uft::Value, std::pair<uft::Value const, xpath::DynamicContext*>, std::_Select1st<std::pair<uft::Value const, xpath::DynamicContext*> >, xpath::Context::ValueCompare, std::allocator<std::pair<uft::Value const, xpath::DynamicContext*> > >::erase(std::_Rb_tree_iterator<std::pair<uft::Value const, xpath::DynamicContext*> >)]+0x28): undefined reference to
std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In functionstd::_Rb_tree<uft::Value, std::pair<uft::Value const, xpath::DynamicContext*>, std::_Select1st<std::pair<uft::Value const, xpath::DynamicContext*> >, xpath::Context::ValueCompare, std::allocator<std::pair<uft::Value const, xpath::DynamicContext*> > >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, std::pair<uft::Value const, xpath::DynamicContext*> const&)': xpath_context.cpp:(.text._ZNSt8_Rb_treeIN3uft5ValueESt4pairIKS1_PN5xpath14DynamicContextEESt10_Select1stIS7_ENS4_7Context12ValueCompareESaIS7_EE10_M_insert_EPKSt18_Rb_tree_node_baseSG_RKS7_[std::_Rb_tree<uft::Value, std::pair<uft::Value const, xpath::DynamicContext*>, std::_Select1st<std::pair<uft::Value const, xpath::DynamicContext*> >, xpath::Context::ValueCompare, std::allocator<std::pair<uft::Value const, xpath::DynamicContext*> > >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, std::pair<uft::Value const, xpath::DynamicContext*> const&)]+0xc4): undefined reference to
std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In functionstd::_Rb_tree_const_iterator<std::pair<uft::Value const, xpath::DynamicContext*> >::operator--()': xpath_context.cpp:(.text._ZNSt23_Rb_tree_const_iteratorISt4pairIKN3uft5ValueEPN5xpath14DynamicContextEEEmmEv[std::_Rb_tree_const_iterator<std::pair<uft::Value const, xpath::DynamicContext*> >::operator--()]+0x1c): undefined reference to
std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In functionstd::_Rb_tree_const_iterator<std::pair<uft::Value const, xpath::DynamicContext*> >::operator++()': xpath_context.cpp:(.text._ZNSt23_Rb_tree_const_iteratorISt4pairIKN3uft5ValueEPN5xpath14DynamicContextEEEppEv[std::_Rb_tree_const_iterator<std::pair<uft::Value const, xpath::DynamicContext*> >::operator++()]+0x1c): undefined reference to
std::_Rb_tree_increment(std::_Rb_tree_node_base const*)' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In function__gnu_cxx::new_allocator<mdom::Node*>::allocate(unsigned int, void const*)': xpath_context.cpp:(.text._ZN9__gnu_cxx13new_allocatorIPN4mdom4NodeEE8allocateEjPKv[__gnu_cxx::new_allocator<mdom::Node*>::allocate(unsigned int, void const*)]+0x4c): undefined reference to
std::__throw_bad_alloc()' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In function__gnu_cxx::new_allocator<mdom::Node>::allocate(unsigned int, void const*)': xpath_context.cpp:(.text._ZN9__gnu_cxx13new_allocatorIN4mdom4NodeEE8allocateEjPKv[__gnu_cxx::new_allocator<mdom::Node>::allocate(unsigned int, void const*)]+0x4c): undefined reference to
std::__throw_bad_alloc()' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In functionstd::_Rb_tree_iterator<std::pair<uft::Value const, xpath::DynamicContext*> >::operator--()': xpath_context.cpp:(.text._ZNSt17_Rb_tree_iteratorISt4pairIKN3uft5ValueEPN5xpath14DynamicContextEEEmmEv[std::_Rb_tree_iterator<std::pair<uft::Value const, xpath::DynamicContext*> >::operator--()]+0x1c): undefined reference to
std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In functionstd::deque<mdom::Node, std::allocator<mdom::Node> >::_M_new_elements_at_front(unsigned int)': xpath_context.cpp:(.text._ZNSt5dequeIN4mdom4NodeESaIS1_EE24_M_new_elements_at_frontEj[std::deque<mdom::Node, std::allocator<mdom::Node> >::_M_new_elements_at_front(unsigned int)]+0x58): undefined reference to
std::__throw_length_error(char const*)' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In functionstd::deque<mdom::Node, std::allocator<mdom::Node> >::_M_new_elements_at_back(unsigned int)': xpath_context.cpp:(.text._ZNSt5dequeIN4mdom4NodeESaIS1_EE23_M_new_elements_at_backEj[std::deque<mdom::Node, std::allocator<mdom::Node> >::_M_new_elements_at_back(unsigned int)]+0x58): undefined reference to
std::__throw_length_error(char const*)' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_context.o): In function__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<uft::Value const, xpath::DynamicContext*> > >::allocate(unsigned int, void const*)': xpath_context.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKN3uft5ValueEPN5xpath14DynamicContextEEEE8allocateEjPKv[__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<uft::Value const, xpath::DynamicContext*> > >::allocate(unsigned int, void const*)]+0x4c): undefined reference to
std::__throw_bad_alloc()' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_yacc.o): In functionstd::list<uft::Value*, std::allocator<uft::Value*> >::_M_insert(std::_List_iterator<uft::Value*>, uft::Value* const&)': xpath_yacc.cpp:(.text._ZNSt4listIPN3uft5ValueESaIS2_EE9_M_insertESt14_List_iteratorIS2_ERKS2_[std::list<uft::Value*, std::allocator<uft::Value*> >::_M_insert(std::_List_iterator<uft::Value*>, uft::Value* const&)]+0x3c): undefined reference to
std::_List_node_base::hook(std::_List_node_base*)' /home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libxml.a(xpath_yacc.o): In function__gnu_cxx::new_allocator<std::_List_node<uft::Value*> >::allocate(unsigned int, void const*)': xpath_yacc.cpp:(.text._ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPN3uft5ValueEEE8allocateEjPKv[__gnu_cxx::new_allocator<std::_List_node<uft::Value*> >::allocate(unsigned int, void const*)]+0x4c): undefined reference to
std::__throw_bad_alloc()' collect2: ld returned 1 exit status make: * [/home/creen/Projects/Riidr/workspace/RiidrEbookReader/obj/local/armeabi/libriidr-jni.so] Error 1
任何信息,问题或任何东西真的是非常AP preciated。
Any info, questions or anything really is highly appreciated.
推荐答案
添加行
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
到Android.mk文件,它应该工作。 如NDK的文档解释,这是因为NDK进行调试,甚至检查,以避免运行时的链接错误,对一些动机它没有找到一个pre建库的正确引用。希望它coulds帮助。
to the Android.mk file and it should work. As explained in the ndk doc, it is because the ndk performs a debug checking even for avoiding runtime linking error and for some motivations it doesn't find the correct references in a pre-built library. Hope it coulds help.
这篇关于NDK建造:未定义参考..错误时,静态链接到libxml.a的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!