我正在尝试将可执行文件链接到 libcutils.so,但出现以下错误:
Executable : gps_test
/home/jbrew/android_gps/jni/lib_dir//libcutils.so: undefined reference to `ioprio_set'
/home/jbrew/android_gps/jni/lib_dir//libcutils.so: undefined reference to `ioprio_get'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/gps_test] Error 1
这是我的 Android.mk 文件的样子:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
gps_test.c
LOCAL_LDLIBS:= -L/home/jbrew/android_gps/jni/lib_dir/ -llog -lhardware -lcutils
LOCAL_C_INCLUDES:= \
/home/jbrew/android_gps/jni/includes
LOCAL_MODULE:= gps_test
#include $(BUILD_SHARED_LIBRARY)
include $(BUILD_EXECUTABLE)
有没有办法让编译器忽略这些?我尝试添加 CFLAG --warn-unresolved-symbols,但编译器不知道该标志的含义。