[Live-devel] Live555 mixing with C source code.

Ross Finlayson finlayson at live555.com
Wed Mar 2 19:39:54 PST 2011


>to avoid problems with inter process comunication i wanna use 
>live555 as a library to my dm6467 encoder C source code.
>
>But, after a quick search about this issue (mixing c and c++) things 
>seems to be very complex. There is a specific way i can achieve such 
>code mix with live555?

Yes - it's actually quite easy.

You can call C functions from C++ by prefixing
	extern "C"
to the function definitions that your C++ code sees.  See, for 
example, the bottom of "groupsock/include/GroupsockHelper.hh".

You can also call C++ functions (regular functions; not member 
functions) from C by prefixing
	extern "C"
to their C++ implementations.  See, for example, the bottom of 
"liveMedia/RTCP.cpp".
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list