Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to use pjsip in Qt?
Forum Updated to NodeBB v4.3 + New Features

How to use pjsip in Qt?

Scheduled Pinned Locked Moved Solved General and Desktop
pjsippjsip & qt
6 Posts 3 Posters 6.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AlperA Offline
    AlperA Offline
    Alper
    wrote on last edited by Alper
    #1

    Hi
    I built pjsip library with mingw in windows.
    I can use it in mingw (pure c++) but i want to add it Qt.

    The compile output:

    15:28:40: Running steps for project appFrameWorkV2...
    15:28:40: Configuration unchanged, skipping qmake step.
    15:28:40: Starting: "C:\Qt\Qt5.6.0\Tools\mingw492_32\bin\mingw32-make.exe" 
    C:/Qt/Qt5.6.0/Tools/mingw492_32/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory 'H:/QtProjects/appFrameWork2-14/build-appFrameWorkV2-Desktop_Qt_5_6_0_MinGW_32bit-Debug'
    g++ -Wl,-subsystem,windows -mthreads -o debug\appFrameWorkV2.exe debug/main.o debug/message.o debug/qrc_qml.o debug/moc_message.o  -lmingw32 -LC:\Qt\Qt5.6.0\5.6\mingw49_32\lib C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libqtmaind.a -LC:\utils\postgresql\pgsql\lib -LC:\utils\my_sql\my_sql\lib -lshell32 C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libQt5Quickd.a C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libQt5Guid.a C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libQt5Qmld.a C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libQt5Networkd.a C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libQt5Cored.a 
    debug/main.o: In function `EpConfig':
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `vtable for pj::EpConfig'
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `pj::UaConfig::UaConfig()'
    Makefile.Debug:67: recipe for target 'debug\appFrameWorkV2.exe' failed
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `pj::LogConfig::LogConfig()'
    mingw32-make[1]: Leaving directory 'H:/QtProjects/appFrameWork2-14/build-appFrameWorkV2-Desktop_Qt_5_6_0_MinGW_32bit-Debug'
    makefile:34: recipe for target 'debug' failed
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `pj::MediaConfig::MediaConfig()'
    debug/main.o: In function `~EpConfig':
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `vtable for pj::EpConfig'
    debug/main.o: In function `~LogConfig':
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:343: undefined reference to `vtable for pj::LogConfig'
    debug/main.o: In function `~UaConfig':
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:170: undefined reference to `vtable for pj::UaConfig'
    debug/main.o: In function `~LogConfig':
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:343: undefined reference to `vtable for pj::LogConfig'
    debug/main.o: In function `ZN2pj8UaConfigD1Ev':
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:170: undefined reference to `vtable for pj::UaConfig'
    debug/main.o: In function `ZN2pj8EpConfigD1Ev':
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `vtable for pj::EpConfig'
    debug/main.o: In function `~LogConfig':
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:343: undefined reference to `vtable for pj::LogConfig'
    debug/main.o: In function `~UaConfig':
    C:/msys64/usr/local/include/pjsua2/endpoint.hpp:170: undefined reference to `vtable for pj::UaConfig'
    collect2.exe: error: ld returned 1 exit status
    mingw32-make[1]: *** [debug\appFrameWorkV2.exe] Error 1
    mingw32-make: *** [debug] Error 2
    15:28:42: The process "C:\Qt\Qt5.6.0\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project appFrameWorkV2 (kit: Desktop Qt 5.6.0 MinGW 32bit)
    When executing step "Make"
    15:28:42: Elapsed time: 00:02.
    
    the_T 1 Reply Last reply
    0
    • AlperA Alper

      Hi
      I built pjsip library with mingw in windows.
      I can use it in mingw (pure c++) but i want to add it Qt.

      The compile output:

      15:28:40: Running steps for project appFrameWorkV2...
      15:28:40: Configuration unchanged, skipping qmake step.
      15:28:40: Starting: "C:\Qt\Qt5.6.0\Tools\mingw492_32\bin\mingw32-make.exe" 
      C:/Qt/Qt5.6.0/Tools/mingw492_32/bin/mingw32-make -f Makefile.Debug
      mingw32-make[1]: Entering directory 'H:/QtProjects/appFrameWork2-14/build-appFrameWorkV2-Desktop_Qt_5_6_0_MinGW_32bit-Debug'
      g++ -Wl,-subsystem,windows -mthreads -o debug\appFrameWorkV2.exe debug/main.o debug/message.o debug/qrc_qml.o debug/moc_message.o  -lmingw32 -LC:\Qt\Qt5.6.0\5.6\mingw49_32\lib C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libqtmaind.a -LC:\utils\postgresql\pgsql\lib -LC:\utils\my_sql\my_sql\lib -lshell32 C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libQt5Quickd.a C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libQt5Guid.a C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libQt5Qmld.a C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libQt5Networkd.a C:\Qt\Qt5.6.0\5.6\mingw49_32\lib\libQt5Cored.a 
      debug/main.o: In function `EpConfig':
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `vtable for pj::EpConfig'
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `pj::UaConfig::UaConfig()'
      Makefile.Debug:67: recipe for target 'debug\appFrameWorkV2.exe' failed
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `pj::LogConfig::LogConfig()'
      mingw32-make[1]: Leaving directory 'H:/QtProjects/appFrameWork2-14/build-appFrameWorkV2-Desktop_Qt_5_6_0_MinGW_32bit-Debug'
      makefile:34: recipe for target 'debug' failed
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `pj::MediaConfig::MediaConfig()'
      debug/main.o: In function `~EpConfig':
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `vtable for pj::EpConfig'
      debug/main.o: In function `~LogConfig':
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:343: undefined reference to `vtable for pj::LogConfig'
      debug/main.o: In function `~UaConfig':
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:170: undefined reference to `vtable for pj::UaConfig'
      debug/main.o: In function `~LogConfig':
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:343: undefined reference to `vtable for pj::LogConfig'
      debug/main.o: In function `ZN2pj8UaConfigD1Ev':
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:170: undefined reference to `vtable for pj::UaConfig'
      debug/main.o: In function `ZN2pj8EpConfigD1Ev':
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:625: undefined reference to `vtable for pj::EpConfig'
      debug/main.o: In function `~LogConfig':
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:343: undefined reference to `vtable for pj::LogConfig'
      debug/main.o: In function `~UaConfig':
      C:/msys64/usr/local/include/pjsua2/endpoint.hpp:170: undefined reference to `vtable for pj::UaConfig'
      collect2.exe: error: ld returned 1 exit status
      mingw32-make[1]: *** [debug\appFrameWorkV2.exe] Error 1
      mingw32-make: *** [debug] Error 2
      15:28:42: The process "C:\Qt\Qt5.6.0\Tools\mingw492_32\bin\mingw32-make.exe" exited with code 2.
      Error while building/deploying project appFrameWorkV2 (kit: Desktop Qt 5.6.0 MinGW 32bit)
      When executing step "Make"
      15:28:42: Elapsed time: 00:02.
      
      the_T Offline
      the_T Offline
      the_
      wrote on last edited by
      #2

      @Alper
      Did you add the library to your project?

      -- No support in PM --

      AlperA 1 Reply Last reply
      1
      • the_T the_

        @Alper
        Did you add the library to your project?

        AlperA Offline
        AlperA Offline
        Alper
        wrote on last edited by
        #3

        @the_ Yes

        the_T 1 Reply Last reply
        0
        • AlperA Alper

          @the_ Yes

          the_T Offline
          the_T Offline
          the_
          wrote on last edited by
          #4

          @Alper

          Maybe I am blind but I cant see any -l<however pjsip .a is named> in the g++ line

          How did you add this library to your project?

          -- No support in PM --

          1 Reply Last reply
          1
          • AlperA Offline
            AlperA Offline
            Alper
            wrote on last edited by Alper
            #5

            I solved it.
            The order is important when adding library.
            I share here maybe anybody will used it!
            This is my .pro file:

            TEMPLATE = app
            QT += qml quick
            QMAKE_CXXFLAGS += -std=c++11 -lstdc++ -m32 -O2 -fPIC -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1
            CONFIG += c++11 -m32
            SOURCES += main.cpp \
                message.cpp
            RESOURCES += qml.qrc
            include(deployment.pri)
            HEADERS += \
                message.h
            DEFINES -= UNICODE
            PKGCONFIG =
            LIBS += -L$$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjsip/lib/ \
            -lpjsua2-i686-pc-mingw32 \
            -lstdc++ \
            -lpjsua-i686-pc-mingw32 \
            -lpjsip-ua-i686-pc-mingw32 \
            -lpjsip-simple-i686-pc-mingw32 \
            -lpjsip-i686-pc-mingw32 \
            -lpjmedia-codec-i686-pc-mingw32 \
            -lpjmedia-i686-pc-mingw32 \
            -lpjmedia-videodev-i686-pc-mingw32 \
            -lpjmedia-audiodev-i686-pc-mingw32 \
            -lpjmedia-i686-pc-mingw32 \
            -lpjnath-i686-pc-mingw32 \
            -lpjlib-util-i686-pc-mingw32 \
            -lsrtp-i686-pc-mingw32 \
            -lresample-i686-pc-mingw32 \
            -lgsmcodec-i686-pc-mingw32 \
            -lspeex-i686-pc-mingw32 \
            -lilbccodec-i686-pc-mingw32 \
            -lg7221codec-i686-pc-mingw32 \
            -lpj-i686-pc-mingw32 \
            -lm \
            -lwinmm \
            -lole32 \
            -lws2_32 \
            -lwsock32
            
            INCLUDEPATH += $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjsip/include \
            $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjlib/include \
            $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjlib-util/include \
            $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjmedia/include \
            $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjnath/include 
            
            DEPENDPATH += $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjsip/include
            
            
            A 1 Reply Last reply
            4
            • AlperA Alper

              I solved it.
              The order is important when adding library.
              I share here maybe anybody will used it!
              This is my .pro file:

              TEMPLATE = app
              QT += qml quick
              QMAKE_CXXFLAGS += -std=c++11 -lstdc++ -m32 -O2 -fPIC -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1
              CONFIG += c++11 -m32
              SOURCES += main.cpp \
                  message.cpp
              RESOURCES += qml.qrc
              include(deployment.pri)
              HEADERS += \
                  message.h
              DEFINES -= UNICODE
              PKGCONFIG =
              LIBS += -L$$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjsip/lib/ \
              -lpjsua2-i686-pc-mingw32 \
              -lstdc++ \
              -lpjsua-i686-pc-mingw32 \
              -lpjsip-ua-i686-pc-mingw32 \
              -lpjsip-simple-i686-pc-mingw32 \
              -lpjsip-i686-pc-mingw32 \
              -lpjmedia-codec-i686-pc-mingw32 \
              -lpjmedia-i686-pc-mingw32 \
              -lpjmedia-videodev-i686-pc-mingw32 \
              -lpjmedia-audiodev-i686-pc-mingw32 \
              -lpjmedia-i686-pc-mingw32 \
              -lpjnath-i686-pc-mingw32 \
              -lpjlib-util-i686-pc-mingw32 \
              -lsrtp-i686-pc-mingw32 \
              -lresample-i686-pc-mingw32 \
              -lgsmcodec-i686-pc-mingw32 \
              -lspeex-i686-pc-mingw32 \
              -lilbccodec-i686-pc-mingw32 \
              -lg7221codec-i686-pc-mingw32 \
              -lpj-i686-pc-mingw32 \
              -lm \
              -lwinmm \
              -lole32 \
              -lws2_32 \
              -lwsock32
              
              INCLUDEPATH += $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjsip/include \
              $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjlib/include \
              $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjlib-util/include \
              $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjmedia/include \
              $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjnath/include 
              
              DEPENDPATH += $$PWD/../../../pjproject-2.5/pj/pjproject-2.5/pjsip/include
              
              
              A Offline
              A Offline
              Antonina
              wrote on last edited by
              #6

              @Alper
              Thank a lot!

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved