我正在使用Android NDK,在编译AVI_open_input_file
的未定义引用时出现了我的代码,并且eclipse出现Could not find Symbol AVI_open_input_file in index
,我在项目中有这个库,但没有考虑到如果不存在,并一直在寻找论坛,无法解决它
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# LOCAL_MODULE := main
LOCAL_MODULE := PrincipalEncoder
LOCAL_SRC_FILES := PrincipalEncoder.cpp
LOCAL_LDLIBS := -lGLESv1_CM -llog
include $(BUILD_SHARED_LIBRARY)
# second lib, which will depend on and include the first one
include $(CLEAR_VARS)
LOCAL_MODULE := avilib
LOCAL_SRC_FILES := avilib.c
LOCAL_WHOLE_STATIC_LIBRARIES := libstlport_static
include $(BUILD_SHARED_LIBRARY)
答案 0 :(得分:0)
您的Android.mk构建了两个共享库,但没有声明它们之间的依赖关系。您可能想要使用以下内容:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := PrincipalEncoder
LOCAL_SRC_FILES := PrincipalEncoder.cpp
LOCAL_LDLIBS := -lGLESv1_CM -llog
LOCAL_SHARED_LIBRARIES := avlib
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := avlib
LOCAL_SRC_FILES := avilib.c
include $(BUILD_SHARED_LIBRARY)