Huge amount of undefined references when compiling pjsip / pjsua samples

On an ubuntu 15.10 VM гve installed pjsip so that I хан work to поверьте виртуальному voip network в very small soft phone for testing.

The package includes some sample code in pjproject-2.4.5/pjsip-apps/src/samples.

When trying to составил the code using g ++ or gcc I get screen full of undefined reference (sample below after running g++ pjsua2_demo.cpp -o pjsua2_demo).

Maybe в path issue?

@witsend Thanks.

/tmp/ccsTUqc5.o: In function 'MyCall:: onCallState (pj:: OnCallStateParam&)': pjsua2_demo.cpp: (. text+0x3e): undefined reference to 'pj:: Call:: getInfo () const'/tmp/ccsTUqc5.o: In function 'mainProg1 (pj:: Endpoint&)': pjsua2_demo.cpp: (. text+0x19c): undefined reference to 'pj:: Endpoint:: libInit (pj:: EpConfig const&)' pjsua2_demo.cpp: (. text+0x1ab): undefined reference to 'pj:: TransportConfig:: TransportConfig ()' pjsua2_demo.cpp: (. text+0x1d0): undefined reference to 'pj:: Endpoint:: transportCreate (pjsip_transport_type_e, pj:: TransportConfig const&)' pjsua2_demo.cpp: (. text+0x1df): undefined reference to 'pj:: Endpoint:: libStart ()' pjsua2_demo.cpp: (. text+0x20a): undefined reference to 'pj:: AccountConfig:: AccountConfig ()'...

0
задан 18 December 2015 в 01:59

1 ответ

Ваш g ++ командная строка на самом деле не связывает ни одной из библиотек, которые Вы просто установили: попробуйте

g++ pjsua2_demo.cpp -o pjsua2_demo `pkg-config --cflags --libs libpjproject`

, См. Создавать Приложение с помощью PJSIP с Инструментами GNU

3
ответ дан 30 September 2019 в 01:00

Другие вопросы по тегам:

Похожие вопросы: