Создание ошибки pjsua с android-ndk-r9

Я использую android-ndk-r9

Когда я пытаюсь скомпилировать образец pjsua android http://goo.gl/sg621z, я получаю следующую ошибку:

Android NDK: WARNING:jni/Android.mk:pjsua: non-system libraries in linker flags: - lpjsua-arm-unknown-linux-androideabi -lpjsip-ua-arm-unknown-linux-androideabi -lpjsip-simple-arm-unknown-linux-androideabi -lpjsip-arm-unknown-linux-androideabi -lpjmedia-codec-arm-unknown-linux-androideabi -lpjmedia-videodev-arm-unknown-linux-androideabi -lpjmedia-arm-unknown-linux-androideabi -lpjmedia-audiodev-arm-unknown-linux-androideabi -lpjmedia-arm-unknown-linux-androideabi -lpjnath-arm-unknown-linux-androideabi -lpjlib-util-arm-unknown-linux-androideabi -lresample-arm-unknown-linux-androideabi -lmilenage-arm-unknown-linux-androideabi -lsrtp-arm-unknown-linux-androideabi -lgsmcodec-arm-unknown-linux-androideabi -lspeex-arm-unknown-linux-androideabi -lilbccodec-arm-unknown-linux-androideabi -lg7221codec-arm-unknown-linux-androideabi -lpj-arm-unknown-linux-androideabi -lgcc -lgcc 
This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the 
current module 
Invoking SWIG...
swig -c++ -o jni/pjsua_wrap.cpp -package org.pjsip.pjsua -outdir src/org/pjsip/pjsua -java jni/pjsua.i
Compile++ thumb : pjsua <= pjsua_wrap.cpp
SharedLibrary : libpjsua.so
arm-linux-androideabi-g++: error: /home/hadi/Development/pjproject/pjsip- apps/build/output/pjsua-arm-unknown-linux-androideabi/pjsua_app.o: No such file or directory
arm-linux-androideabi-g++: error: /home/hadi/Development/pjproject/pjsip-apps/build/output/pjsua-arm-unknown-linux-androideabi/pjsua_app_cli.o: No such file or directory
arm-linux-androideabi-g++: error: /home/hadi/Development/pjproject/pjsip-apps/build/output/pjsua-arm-unknown-linux-androideabi/pjsua_app_common.o: No such file or directory
arm-linux-androideabi-g++: error: /home/hadi/Development/pjproject/pjsip-apps/build/output/pjsua-arm-unknown-linux-androideabi/pjsua_app_config.o: No such file or directory
arm-linux-androideabi-g++: error: /home/hadi/Development/pjproject/pjsip-apps/build/output/pjsua-arm-unknown-linux-androideabi/pjsua_app_legacy.o: No such file or directory
make: *** [obj/local/armeabi/libpjsua.so] Error 1

Это стандартный Android.mk, который поставляется с образцом

# $Id$

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

# Get PJ build settings
include ../../../../build.mak
include $(PJDIR)/build/common.mak

# Path to SWIG
MY_SWIG := swig

MY_MODULE_PATH := $(PJDIR)/pjsip-apps/build/output/pjsua-$(TARGET_NAME)
MY_MODULES := $(MY_MODULE_PATH)/pjsua_app.o \
 $(MY_MODULE_PATH)/pjsua_app_cli.o \
 $(MY_MODULE_PATH)/pjsua_app_common.o \
 $(MY_MODULE_PATH)/pjsua_app_config.o \
 $(MY_MODULE_PATH)/pjsua_app_legacy.o

# Constants
MY_JNI_WRAP := pjsua_wrap.cpp
MY_JNI_DIR := jni

# Android build settings
LOCAL_MODULE := libpjsua
LOCAL_CFLAGS := -Werror $(APP_CFLAGS) -frtti
LOCAL_LDFLAGS := $(APP_LDFLAGS)
LOCAL_LDLIBS := $(MY_MODULES) $(APP_LDLIBS)
LOCAL_SRC_FILES := $(MY_JNI_WRAP) pjsua_app_callback.cpp

# Invoke SWIG
$(MY_JNI_DIR)/$(MY_JNI_WRAP):
 @echo "Invoking SWIG..."
 $(MY_SWIG) -c++ -o $(MY_JNI_DIR)/$(MY_JNI_WRAP) -package org.pjsip.pjsua -outdir src/org/pjsip/pjsua -java $(MY_JNI_DIR)/pjsua.i

.PHONY: $(MY_JNI_DIR)/$(MY_JNI_WRAP)

include $(BUILD_SHARED_LIBRARY)
1 ответ

Перед выполнением команды ndk-build выполните следующие действия:

cd pjsip-apps/build сделать pjsua

затем выполните ndk-build в каталоге /pjsip-apps/src/pjsua/android

взгляните на следующий блог

http://srikayala.wordpress.com/2013/12/05/pjsip-for-android-installation-on-mac-osx-mavericks/

для дополнительной информации

licensed under cc by-sa 3.0 with attribution.