Android 编译时出错 /lib/libdl.so.2: could not read symbols: Invalid operation

海绵宝宝的欧尼 2011-04-17

如果出现这个错误:
/usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/accRuntimeTest_intermediates/runtimeTest.o: undefined reference to dlsym@@GLIBC_2.0
/usr/bin/ld: note: 'dlsym@@GLIBC_2.0' is defined in DSO /lib/libdl.so.2 so try adding it to the linker command line
/lib/libdl.so.2: could not read symbols: Invalid operation
 
那: vi system/core/libacc/tests/Android.mk
 
LOCAL_SHARED_LIBRARIES := \
    libacc
 
LOCAL_LDLIBS += -ldl             <<===
 
- - - - - - - - - -
 
LOCAL_SHARED_LIBRARIES := \
    libacc
 
LOCAL_LDLIBS += -ldl
 
LOCAL_MODULE_TAGS := tests
 
include $(BUILD_HOST_EXECUTABLE)

相关推荐

zmjzhangmj / 0评论 2020-01-07
GoatSucker / 0评论 2019-12-22