[x264-devel] Re: x264 for g++ compiler on r239

Måns Rullgård mru at inprovide.com
Wed May 25 15:42:03 CEST 2005


Bill May <wmay at cisco.com> writes:

> Måns Rullgård wrote:
>> There's no reason to compile C code with a C++ compiler.  A separate
>> C++ wrapper is a much better solution.  Those casts required by C++
>> are actually a bad thing to do in C, as they will hide some potential
>> errors.
>
> There's really no need for a wrapper class - the apis are very
> straight forward, the code is very self contained (no statics, no
> use of global variables).  I call the library from c++ code for mpeg4ip.

I agree totally, but if someone insists on a C++ class interface to
x264, a wrapper is much better than poking around in the code.

> What would be nice is:
>
> #ifdef __cplusplus
> extern "C" {
> #endif
>
> #ifdef __cplusplus
> }
> #endif
>
> around the function calls.

I guess we could do this.  Anyone against it?

-- 
Måns Rullgård
mru at inprovide.com

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list