我正试图创建一个csipsimple项目,如this教程中所述。
我一直跟着它,但我不能让它工作。
这些是我得到的日志:
在构建NDK时,我会遇到许多类似的错误

Android NDK: No local settings... build all in release mode !
Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 4 in ./AndroidManifest.xml
Android NDK: WARNING:jni/openssl/android_toolchain/Android.mk:crypto_ec_static: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:jni/openssl/sources/crypto/Android.mk:crypto_static: LOCAL_LDLIBS is always ignored for static libraries
Android NDK: WARNING:jni/pjsip/android_toolchain/pjmedia/Android.mk:pj_video_android: non-system libraries in linker flags: jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/../../../ffmpeg/build/ffmpeg/armeabi/lib/libavcodec.a jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/../../../ffmpeg/build/ffmpeg/armeabi/lib/libavformat.a jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/../../../ffmpeg/build/ffmpeg/armeabi/lib/libswscale.a jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/../../../ffmpeg/build/ffmpeg/armeabi/lib/libavutil.a jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/../../../ffmpeg/build/x264/armeabi/lib/libx264.a
Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK:     current module

最后,在看似成功的编译之后,我得到了如下结论:
swig2.0 -DPJ_ANDROID=1 -DUSE_CSIPSIMPLE=1 -DPJMEDIA_HAS_G729_CODEC=1 -DPJMEDIA_HAS_G726_CODEC=1 -DPJMEDIA_HAS_ILBC_CODEC=0 -DPJMEDIA_HAS_G722_CODEC=1 -DPJMEDIA_HAS_SPEEX_CODEC=1 -DPJMEDIA_HAS_GSM_CODEC=1 -DPJMEDIA_HAS_SILK_CODEC=1 -DPJMEDIA_HAS_CODEC2_CODEC=1 -DPJMEDIA_HAS_G7221_CODEC=1 -DPJMEDIA_HAS_WEBRTC_CODEC=1 -DPJMEDIA_HAS_OPENCORE_AMRNB_CODEC=1 -DPJMEDIA_HAS_OPENCORE_AMRWB_CODEC=1 -DPJMEDIA_HAS_OPUS_CODEC=1 -DPJMEDIA_HAS_WEBRTC_AEC=1 -DPJMEDIA_HAS_VIDEO=1 -DPJMEDIA_VIDEO_DEV_HAS_CBAR_SRC=0 -DPJ_HAS_SSL_SOCK=1 -DPJMEDIA_HAS_ZRTP=1 -DPJSUA_SDP_SESS_HAS_CONN=1 -DPJ_AUTOCONF=1 -DPJ_HAS_FLOATING_POINT=1 \
        -Ijni/swig-glue/android_toolchain/../../csipsimple-wrapper/include \
        -Ijni/swig-glue/android_toolchain/../../pjsip_mod_reghandler/include \
        -Ijni/swig-glue/android_toolchain/../../pjsip_mod_sipclf/include \
        -Ijni/swig-glue/android_toolchain/../../pjsip_mod_earlylock/include \
        -o jni/swig-glue/android_toolchain/../nativesrc/pjsua_wrap.cpp \
        -outdir src/org/pjsip/pjsua -java -package org.pjsip.pjsua \
        -c++ jni/swig-glue/android_toolchain/../.interface.i
make[1]: execvp: swig2.0: Permission denied
make[1]: *** [jni/swig-glue/android_toolchain/../nativesrc/pjsua_wrap.cpp] Error 127
make[1]: *** Waiting for unfinished jobs....
rm jni/swig-glue/android_toolchain/../.pjsua.i jni/swig-glue/android_toolchain/../.interface.i
make[1]: Leaving directory `/Users/xxx/Documents/sip/CSipSimple-trunk/CSipSimple'
make: *** [libraries] Error 2

P.S.我作为根运行。
解决方案
我安装了swig,但安装不正确。

最佳答案

最后,我找到了解决办法。链接时出错。
1-如果你有链接,请删除旧链接。
2-并将此命令写入终端:

sudo link -s /usr/local/bin/swig /opt/local/bin/swig2.0

我希望这能奏效

09-29 22:36