我有以下代码...
gl_game.cpp
#include <camera/Camera.h>
....
using namespace android;
LOGI("Number of cameras are... %d", Camera::getNumberOfCameras());
和Android.mk ...
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../AOSP/frameworks/av/include $(LOCAL_PATH)/../../AOSP/frameworks/native/include $(LOCAL_PATH)/../../AOSP/system/core/include $(LOCAL_PATH)/../../AOSP/hardware/libhardware/include
当我尝试编译时,我看到一个链接器错误......
error: undefined reference to 'android::Camera::getNumberOfCameras()'
我假设这是因为我从未将包含 Camera.cpp 的 .so 添加到我的 LOCAL_LDLIBS 但我找不到要添加到链接器的正确 .so 文件。有人知道怎么做吗?