我使用的Android NDK-R9誤差建築pjsua有Android NDK-R9
當我嘗試編譯pjsua機器人樣品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
這是默認自帶的樣本
# $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)
您的SWIG文件夾在哪裏下載和配置? – BigT
曾經發現過這個問題的解決方案嗎? – sigmabeta
我也得到同樣的錯誤..你擺脫了它?還是還擊? – srikayala