Android omapl138 ボードで dsplink アプリケーションを実行しています。ターミナルでアプリケーションを実行できます。dsplink アプリケーションを ndk に含め、次を使用してコンパイルしようとしましたAndroid.mk
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_LDLIBS += $(LOCAL_PATH)/dsplink.a
LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\export\INCLUDE\Linux\OMAPL138\sys
LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\export\INCLUDE\Linux\OMAPL138\usr
LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\inc\sys\linux
LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\src\api
LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\export\INCLUDE\Linux\OMAPL138\internal
LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\export\INCLUDE\Linux\OMAPL138\sys\arch
LOCAL_MODULE := libdsp-message
LOCAL_SRC_FILES := message.c message_os.c
include $(BUILD_SHARED_LIBRARY)
コンパイル中に、次のエラーが発生します
"Compile thumb : dsp-message <= message.c
"Compile thumb : dsp-message <= message_os.c
SharedLibrary : libdsp-message.so
C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `DRV_Initialize':
_sync_usr.c:(.text+0xb10): undefined reference to `getpagesize' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `DRV_ProtectInit':
**_sync_usr.c:(.text+0x24b4): undefined reference to `semget'**
_sync_usr.c:(.text+0x24d4): undefined reference to `__errno_location'
_sync_usr.c:(.text+0x24f4): undefined reference to `semget'
_sync_usr.c:(.text+0x2538): undefined reference to `semctl' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `DRV_ProtectExit':
_sync_usr.c:(.text+0x25dc): undefined reference to `semctl' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `DRV_ProtectEnter':
_sync_usr.c:(.text+0x26b4): undefined reference to `semop'
_sync_usr.c:(.text+0x26c4): undefined reference to `__errno_location' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `DRV_ProtectLeave':
_sync_usr.c:(.text+0x2800): undefined reference to `semop' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `DRV_installCleanupRoutines':
_sync_usr.c:(.text+0x2898): undefined reference to `sigemptyset'
_sync_usr.c:(.text+0x28a4): undefined reference to `sigfillset' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `NOTIFY_eventWorker':
_sync_usr.c:(.text+0x7ee4): undefined reference to `sigfillset' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `_SYNC_USR_init':
_sync_usr.c:(.text+0x13ca8): undefined reference to `semget'
_sync_usr.c:(.text+0x13d30): undefined reference to `semctl' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `_SYNC_USR_exit':
_sync_usr.c:(.text+0x13e34): undefined reference to `semget'
_sync_usr.c:(.text+0x13e84): undefined reference to `semctl' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `_SYNC_USR_createCS':
_sync_usr.c:(.text+0x14008): undefined reference to `semget'
_sync_usr.c:(.text+0x14020): undefined reference to `__errno_location' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `_SYNC_USR_enterCS':
_sync_usr.c:(.text+0x14358): undefined reference to `semop'
_sync_usr.c:(.text+0x14368): undefined reference to `__errno_location' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
function `_SYNC_USR_leaveCS':
_sync_usr.c:(.text+0x144a0): undefined reference to `semop' collect2: ld returned 1 exit status
make: ***
[C:/NDK/android-ndk-r8/samples/two-libs//obj/local/armeabi/libdsp-message.so]
Error 1