PJSIP 2.5.5 libyuv未定义参考

时间:2016-10-11 10:17:02

标签: android c++ qt pjsip

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

包括以下库并包括:

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因某些原因无法识别? "未定义"方法存在于头文件中。欢迎任何想法! :)

1 个答案:

答案 0 :(得分:0)

图书馆的顺序错了。正确的顺序是:

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