Build a library which uses libwebrtc sources, and link with it, in final application

182 views
Skip to first unread message

Peter Arnold

unread,
Apr 19, 2022, 11:26:18 AM4/19/22
to discuss-webrtc
Hi everyone! I have build library RTCSDK link below, qmake file is attached.
This library use a lot of source from webrtc, it inheritate it's headers, multithreading model , and other. 

link: 


As was described, by the owner, he used m96 release, so I swithed to it and build library. I use this flags: 

gn gen out/Default --args='target_os="linux" target_cpu="x64" is_debug=true is_component_build=false rtc_use_h264=true use_rtti=true use_custom_libcxx=false treat_warnings_as_errors=false enable_libaom=true rtc_include_tests=false use_custom_libcxx_for_host=false'

After, I build a library, succesfully, I used it for creation a local application, which linked with my builded library and webrtc second pro file attached with it. 
And when I try to build it , it starts with linkage error, but nm shows me, like this functions are in place:

/usr/bin/ld: /home/user/Desktop/LinuxBuildJanusLibrary/build-RTCSln-Desktop_Qt_5_12_12_GCC_64bit-Debug/x64/Debug/libRTCSDK.a(logger.o): in function `vi::Logger::init()':

/home/user/Desktop/LinuxBuildJanusLibrary/build-RTCSln-Desktop_Qt_5_12_12_GCC_64bit-Debug/RTCSDK/../../janus-client/RTCSDK/logger/logger.cpp:59: undefined reference to `rtc::LogMessage::SetLogToStderr(bool)'

nm:

0000000000000ce0 T rtc::LogMessage::SetLogToStderr(bool)


/usr/bin/ld: /home/user/Desktop/LinuxBuildJanusLibrary/build-RTCSln-Desktop_Qt_5_12_12_GCC_64bit-Debug/RTCSDK/../../janus-client/RTCSDK/logger/logger.cpp:60: undefined reference to `rtc::LogMessage::AddLogToStream(rtc::LogSink*, rtc::LoggingSeverity)'
/usr/bin/ld: /home/user/Desktop/LinuxBuildJanusLibrary/build-RTCSln-Desktop_Qt_5_12_12_GCC_64bit-Debug/x64/Debug/libRTCSDK.a(logger.o): in function `vi::Logger::destroy()':

nm:

0000000000000e40 T rtc::LogMessage::RemoveLogToStream(rtc::LogSink*)

/home/user/Desktop/LinuxBuildJanusLibrary/build-RTCSln-Desktop_Qt_5_12_12_GCC_64bit-Debug/RTCSDK/../../janus-client/RTCSDK/logger/logger.cpp:71: undefined reference to `rtc::LogMessage::RemoveLogToStream(rtc::LogSink*)'

nm:

0000000000000e40 T rtc::LogMessage::RemoveLogToStream(rtc::LogSink*)

/usr/bin/ld: /home/user/Desktop/LinuxBuildJanusLibrary/build-RTCSln-Desktop_Qt_5_12_12_GCC_64bit-Debug/x64/Debug/libRTCSDK.a(logger.o): in function `rtc::LogSink::LogSink()':

/home/user/Desktop/LinuxBuildJanusLibrary/build-RTCSln-Desktop_Qt_5_12_12_GCC_64bit-Debug/RTCSDK/../../janus-client/3rd/webrtc/include/rtc_base/logging.h:112: undefined reference to `vtable for rtc::LogSink'

I checked some source files, for building with included headers, I found them.

So I don't know for now, how it is possible to build this library and my application so it could be linked with webrtc library? 


UI.pro
RTCSDK.pri
UI.pri
RTCSDK.pro
Reply all
Reply to author
Forward
0 new messages