use libjingle as a external library

655 views
Skip to first unread message

Edwin Zhang

unread,
Feb 19, 2014, 5:24:21 PM2/19/14
to discuss...@googlegroups.com
Hi All,

I'm new in the libjingle thing, so the question may look silly to others.

I'm trying to develop my own application which uses the peerconnection in libjingle to establish connection to browser to do webrtc calls.
However, currently I'm unable to make any progress to compile the libjingle with my application.

I'm using Ubuntu, and I can successfully use ninja to compile the library.
After compiling libjingle, under trunk/out/Debug, I can find 'libjingle_peerconnection_so.so' file, which I believe I need to link my program to.

In my Makefile, I have:

-I libjingle/trunk -DPOSIX -Llibjingle/trunk/out/Debug -ljingle_peerconnection_so

In my source file, I have:

#include "talk/app/webrtc/peerconnection.h"

in the main program, i was simply trying to call:

talk_base::scoped_refptr<webrtc::PeerConnectionFactoryInterface> factory = webrtc::CreatePeerConnectionFactory();

It keeps telling me undefined reference.

Can you tell me what I did wrong here??

C.G. Anderson

unread,
Feb 19, 2014, 10:29:15 PM2/19/14
to discuss...@googlegroups.com
Hi Edwin, I'malso new to libjingle, so this is only a hunch....
Based on the fact you are using talk_base, I wonder if you are missing some other libraries, at a minimum, the base lib, libjingle.

I'm syncing w/chromium right nowso can't quickly confirm anything (even the base/core libname)... my machine is running like mud right now...but I believe the base libname is just libjingle.

Also may require other headers, the peer conection samples code (client and server) should give you a good idea of what you need.

Hope this helps
CG

Francois Temasys

unread,
Feb 20, 2014, 1:21:32 AM2/20/14
to discuss...@googlegroups.com
Hi Edwin,

In my point of view, I would not link with your makefile but let gyp generate your makefile for you. Create your own gyp configuration project (based on peerconnection_client for example) and link it with libjingle from there. Trying to use libjingle may need to use lots of compilation options that you don't want to care (gyp will do it for you).

Second point, on Ubuntu the libjingle.a is located in out/Debug/obj/talk.

Edwin Edwin

unread,
Feb 20, 2014, 4:25:39 PM2/20/14
to discuss...@googlegroups.com
Thanks, Francois.

Edwin Edwin

unread,
Feb 20, 2014, 4:29:30 PM2/20/14
to discuss...@googlegroups.com
Hi C.G.,

I was planning to use the peerconnection instead of talk_base. I think they don't have examples for using the peerconnection.
Like what Francois said, maybe I should use gyp instead of my own makefile.
By roughly reading the .ninja file, they do have lots of flags for just compilation.

C.G. Anderson

unread,
Feb 20, 2014, 4:43:06 PM2/20/14
to discuss...@googlegroups.com
I was referring to the use of the talk_base derived factory, talk_base::scoped_refptr<webrtc::PeerConnectionFactoryInterface> factory = webrtc::CreatePeerConnectionFactory();

thought maybe it would require you link in the base library as well as the peerconnection focused one.

which may be what gyp will figure out for you, i.e. find all the dependencies you are missing, like libjingle itself.
best



--
 
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

C.G. Anderson

unread,
Feb 20, 2014, 4:51:08 PM2/20/14
to discuss...@googlegroups.com
yep, if you look at the example code for just peerconnection_client, it becomes very obvious you have a lot of dependencies to include, including libjingle and several others.  I'm looking at Windows build, but I'm assuming Linux will be the same on the dependencies within webrtc.

so if using gyp will do it for you automagically, then that is an easy way to deal with it.  When I'm in learning mode, I tend to be more of a glutton for punishment and try to figure out things manually (but that's just my addiction/affliction, of course!)

cheers!
C.G.

Jesús Leganés Combarro

unread,
Feb 21, 2014, 5:26:22 AM2/21/14
to discuss...@googlegroups.com
Isn't there anywhere a .deb file with the libWebrtc library? At least on a PPA? This would help development a lot...

Travis

unread,
Feb 21, 2014, 12:21:58 PM2/21/14
to discuss...@googlegroups.com
Not sure if this will save anyone a lot of time and heartache but when I created my wrapper basing off the peer connection example, I eventually ended up linking the following libs.

wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;crypt32.lib;iphlpapi.lib;secur32.lib;Strmiids.lib;dmoguids.lib;wmcodecdspuuid.lib;amstrmid.lib;msdmo.lib;jsoncpp.lib;libjingle_peerconnection.lib;libjingle.lib;expat.lib;crnss.lib;nss_static.lib;crnspr.lib;sqlite3.lib;icui18n.lib;icuuc.lib;libjingle_media.lib;libyuv.lib;libjpeg.lib;video_capture_module.lib;webrtc_utility.lib;audio_coding_module.lib;CNG.lib;common_audio.lib;system_wrappers.lib;common_audio_sse2.lib;G711.lib;G722.lib;iLBC.lib;iSAC.lib;iSACFix.lib;PCM16B.lib;NetEq.lib;webrtc_opus.lib;opus.lib;acm2.lib;NetEq4.lib;media_file.lib;webrtc_video_coding.lib;webrtc_i420.lib;common_video.lib;video_coding_utility.lib;webrtc_vp8.lib;libvpx.lib;libvpx_asm_offsets_vp8.lib;libvpx_intrinsics_mmx.lib;libvpx_intrinsics_sse2.lib;libvpx_intrinsics_ssse3.lib;directshow_baseclasses.lib;video_render_module.lib;video_engine_core.lib;rtp_rtcp.lib;paced_sender.lib;remote_bitrate_estimator.lib;rbe_components.lib;bitrate_controller.lib;video_processing.lib;video_processing_sse2.lib;voice_engine.lib;audio_conference_mixer.lib;audio_processing.lib;audioproc_debug_proto.lib;protobuf_lite.lib;audio_processing_sse2.lib;audio_device.lib;libjingle_sound.lib;libjingle_p2p.lib;libsrtp.lib;crssl.lib;usrsctplib.lib

Jesús Leganés Combarro

unread,
Feb 26, 2014, 3:11:16 AM2/26/14
to discuss...@googlegroups.com
wininet.lib;dnsapi.lib;version.lib;msimg32.lib;ws2_32.lib;usp10.lib;psapi.lib;dbghelp.lib;winmm.lib;shlwapi.lib;kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;crypt32.lib;iphlpapi.lib;secur32.lib;Strmiids.lib;dmoguids.lib;wmcodecdspuuid.lib;amstrmid.lib;msdmo.lib;jsoncpp.lib;libjingle_peerconnection.lib;libjingle.lib;expat.lib;crnss.lib;nss_static.lib;crnspr.lib;sqlite3.lib;icui18n.lib;icuuc.lib;libjingle_media.lib;libyuv.lib;libjpeg.lib;video_capture_module.lib;webrtc_utility.lib;audio_coding_module.lib;CNG.lib;common_audio.lib;system_wrappers.lib;common_audio_sse2.lib;G711.lib;G722.lib;iLBC.lib;iSAC.lib;iSACFix.lib;PCM16B.lib;NetEq.lib;webrtc_opus.lib;opus.lib;acm2.lib;NetEq4.lib;media_file.lib;webrtc_video_coding.lib;webrtc_i420.lib;common_video.lib;video_coding_utility.lib;webrtc_vp8.lib;libvpx.lib;libvpx_asm_offsets_vp8.lib;libvpx_intrinsics_mmx.lib;libvpx_intrinsics_sse2.lib;libvpx_intrinsics_ssse3.lib;directshow_baseclasses.lib;video_render_module.lib;video_engine_core.lib;rtp_rtcp.lib;paced_sender.lib;remote_bitrate_estimator.lib;rbe_components.lib;bitrate_controller.lib;video_processing.lib;video_processing_sse2.lib;voice_engine.lib;audio_conference_mixer.lib;audio_processing.lib;audioproc_debug_proto.lib;protobuf_lite.lib;audio_processing_sse2.lib;audio_device.lib;libjingle_sound.lib;libjingle_p2p.lib;libsrtp.lib;crssl.lib;usrsctplib.lib

This are definitely too much libraries just for an entry level, we need pre-compiled libraries as soon as possible. 

Rudolf Olah

unread,
Jun 21, 2014, 11:46:57 AM6/21/14
to discuss...@googlegroups.com
Awesome, that's really useful.

I'm trying to create a libjingle/libwebrtc app using a Makefile. The suggestion to use GYP isn't very good when all we're looking for is a nice list of the libraries that need to be linked to when building a libjingle app.
Reply all
Reply to author
Forward
0 new messages