PJSIP 2.5.5 libyuv 未定义参考

PJSIP 2.5.5 libyuv undefined reference

我正在尝试使用 PJSIP 2.5.5 编译我的项目,包括对 Android 和 Qt 5.7 的视频支持。

在包括以下库和 includes 中:

INCLUDEPATH +=  $$PWD/pjproject-2.5.5/third_party/yuv/include \
            $$PWD/pjproject-2.5.5/pjsip/include \
            $$PWD/pjproject-2.5.5/pjlib/include \
            $$PWD/pjproject-2.5.5/pjlib-util/include \
            $$PWD/pjproject-2.5.5/pjmedia/include \
            $$PWD/pjproject-2.5.5/pjnath/include \
            $$PWD/pjproject-2.5.5/openh264-build-output/libs/armeabi-v7a/include/wels
LIBS        +=  -L$$PWD/pjproject-2.5.5/third_party/lib \
            -L$$PWD/pjproject-2.5.5/lib \
            -L$$PWD/pjproject-2.5.5/pjlib/lib \
            -L$$PWD/pjproject-2.5.5/pjlib-util/lib \
            -L$$PWD/pjproject-2.5.5/pjmedia/lib \
            -L$$PWD/pjproject-2.5.5/pjnath/lib \
            -L$$PWD/pjproject-2.5.5/pjsip/lib \
            -L$$PWD/pjproject-2.5.5/pjnath/lib \
            -L$$PWD/pjproject-2.5.5/openh264-build-output/libs/armeabi-v7a/lib \
            -lyuv-arm-unknown-linux-androideabi \
            -lpjmedia-audiodev-arm-unknown-linux-androideabi \
            -lpjmedia-videodev-arm-unknown-linux-androideabi \
            -lpjsip-arm-unknown-linux-androideabi \
            -lpjsua2-arm-unknown-linux-androideabi \
            -lpjsua-arm-unknown-linux-androideabi \
            -lpjsip-simple-arm-unknown-linux-androideabi \
            -lpjsdp-arm-unknown-linux-androideabi \
            -lpjmedia-arm-unknown-linux-androideabi \
            -lpjsip-arm-unknown-linux-androideabi \
            -lpjmedia-audiodev-arm-unknown-linux-androideabi \
            -lpjsip-ua-arm-unknown-linux-androideabi \
            -lpjnath-arm-unknown-linux-androideabi \
            -lpjmedia-codec-arm-unknown-linux-androideabi \
            -lpj-arm-unknown-linux-androideabi \
            -lpjmedia-arm-unknown-linux-androideabi \
            -lilbccodec-arm-unknown-linux-androideabi \
            -lgsmcodec-arm-unknown-linux-androideabi \
            -lspeex-arm-unknown-linux-androideabi \
            -lresample-arm-unknown-linux-androideabi \
            -lsrtp-arm-unknown-linux-androideabi \
            -lpj-arm-unknown-linux-androideabi \
            -lpjlib-util-arm-unknown-linux-androideabi \
            -lopenh264

在编译过程中出现以下错误:

C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjsip/lib/libpjsua-arm-unknown-linux-androideabi.a(pjsua_vid.o):pjsua_vid.c:function pjsua_vid_subsys_init: error: undefined reference to 'pjmedia_vid_dev_subsys_init'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjsip/lib/libpjsua-arm-unknown-linux-androideabi.a(pjsua_vid.o):pjsua_vid.c:function pjsua_vid_subsys_destroy: error: undefined reference to 'pjmedia_vid_dev_subsys_shutdown'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_i420: error: undefined reference to 'RGB24ToI420'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_i420: error: undefined reference to 'ABGRToI420'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_i420: error: undefined reference to 'ARGBToI420'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_i420: error: undefined reference to 'YUY2ToI420'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_i420: error: undefined reference to 'UYVYToI420'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_i420: error: undefined reference to 'I422ToI420'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_i420: error: undefined reference to 'I420ToRGB24'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_i420: error: undefined reference to 'I420ToABGR'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_i420: error: undefined reference to 'I420ToARGB'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_i420: error: undefined reference to 'I420ToYUY2'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_i420: error: undefined reference to 'I420ToUYVY'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_i420: error: undefined reference to 'I420ToI422'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_i420: error: undefined reference to 'I420Scale'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_bgra: error: undefined reference to 'RGB24ToARGB'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_bgra: error: undefined reference to 'ABGRToARGB'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_bgra: error: undefined reference to 'YUY2ToARGB'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_bgra: error: undefined reference to 'UYVYToARGB'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_bgra: error: undefined reference to 'I422ToARGB'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_to_bgra: error: undefined reference to 'I420ToARGB'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_bgra: error: undefined reference to 'ARGBToRGB24'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_bgra: error: undefined reference to 'ARGBToABGR'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_bgra: error: undefined reference to 'ARGBToYUY2'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_bgra: error: undefined reference to 'ARGBToUYVY'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_bgra: error: undefined reference to 'ARGBToI422'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_bgra: error: undefined reference to 'ARGBToI420'
C:/Users/df/Desktop/Sources/Qt/projectA/pjproject-2.5.5/pjmedia/lib/libpjmedia-arm-unknown-linux-androideabi.a(converter_libyuv.o):converter_libyuv.c:conv_from_bgra: error: undefined reference to 'ARGBScale'
collect2.exe: error: ld returned 1 exit status

似乎由于某种原因无法识别 libyuv? "undefined" 方法存在于头文件中。欢迎任何想法! :)

库的顺序错误。正确的顺序是:

LIBS    +=  -L$$PWD/pjproject-2.5.5/third_party/lib \
        -L$$PWD/pjproject-2.5.5/lib \
        -L$$PWD/pjproject-2.5.5/pjlib/lib \
        -L$$PWD/pjproject-2.5.5/pjlib-util/lib \
        -L$$PWD/pjproject-2.5.5/pjmedia/lib \
        -L$$PWD/pjproject-2.5.5/pjnath/lib \
        -L$$PWD/pjproject-2.5.5/pjsip/lib \
        -L$$PWD/pjproject-2.5.5/pjnath/lib \
        -L$$PWD/pjproject-2.5.5/third_party/openh264/libs/armeabi-v7a/lib \
        -lpjsua2-arm-unknown-linux-androideabi \
        -lstdc++ \
        -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-arm-unknown-linux-androideabi \
        -lpjmedia-videodev-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  \
        -lsrtp-arm-unknown-linux-androideabi \
        -lresample-arm-unknown-linux-androideabi \
        -lgsmcodec-arm-unknown-linux-androideabi \
        -lspeex-arm-unknown-linux-androideabi \
        -lilbccodec-arm-unknown-linux-androideabi \
        -lg7221codec-arm-unknown-linux-androideabi \
        -lyuv-arm-unknown-linux-androideabi  \
        -lpj-arm-unknown-linux-androideabi \
        -lopenh264 \
        -lstdc++ \
        -lm \
        -lgnustl_static  \
        -lc \
        -lgcc \
        -ldl \
        -lOpenSLES \
        -llog \
        -lGLESv2 \
        -lEGL \
        -landroid