[Ffmpeg-devel] [PATCH] Add allformats.h include file to move *_init() functions and other

Steve Lhomme steve.lhomme
Fri Jun 30 09:40:25 CEST 2006

Rich Felker wrote:
> On Thu, Jun 29, 2006 at 10:37:28AM -0700, Mike Melanson wrote:
>> Steve Lhomme wrote:
>>> Is there a C compiler that fails on extern "C" ? At least among the
>>> one(s) supported by FFMPEG.
>> It's a moot issue since the extern is surrounded by "#ifdef __cplusplus".
> My point is that C++ code does not belong in a C project, even under
> #ifdef!!! If a C++ project is doing interlanguage linking to C code,
> then it should put the C headers inside its own 'extern "C"' block to
> make this clear.

I agree. Except that libavcodec/libavformat are libraries. And the 
library user (ie a programmer) shouldn't have to wonder if the C calling 
convention or the C++ one has to be applied. Unless he has to check the 
original source to see what is the original programming language.

Anyway, it's not necessary on anything else than avcodec.h and avformat.h


robUx4 on blog <http://robux4.blogspot.com/>

More information about the ffmpeg-devel mailing list