0

我正在使用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) 
4

1 回答 1

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) 
于 2013-07-17T16:59:11.670 回答