[Ffmpeg-devel] [PATCH] Add allformats.h include file to move *_init() functions and other
Sat Jul 1 09:02:15 CEST 2006
Rich Felker wrote:
> On Fri, Jun 30, 2006 at 09:40:25AM +0200, Steve Lhomme wrote:
>> 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.
> Nonsense. There's no way you can use a library without knowing its
Precisely to tell the library user what calling convention has to be
used. Imagine a library that has both C and C++ code (a C++ API with
some C callbacks for example). Is it up to the library user to know what
is the format of the C parts ? No. It's up to the library to tell what
BTW, I don't have Linux loaded, but in MinGW I can see 280 standard
headers that have the '#ifdef _cplusplus extern "C"' thingy...
> Anyway the language for any legitimate library is C.
Shouldn't there be just one language and one OS anyway ?
robUx4 on blog <http://robux4.blogspot.com/>
More information about the ffmpeg-devel