[Flac-dev] make headers C++ compatible?
Josh Coalson
xflac at yahoo.com
Thu Aug 16 10:17:51 PDT 2001
--- Joshua Haberman <jhaberman at ups.edu> wrote:
> Hello FLACers,
>
> I'm working on implementing FLAC support for Audacity, a
> cross-platform
> audio editor (audacity.sourceforge.net). We're experimenting with
> using
> FLAC as the internal data representation.
ooh, cool.
> Unfortunately, the FLAC headers cannot be used in C++ programs
> because of
> the use of 'private' and 'protected' as variable names in
> stream_decoder.h, stream_encoder.h, and file_decoder.h. These are of
> course reserved words in C++.
ooh, not cool. OK, this was bad planning on my part. I
will fix this for the next release. if you are linking to
a prebuilt libFLAC then all you have to do is rename the
'private' and 'protected' struct members to something else
in the three problem headers (include/FLAC/*coder.h).
> Would it be possible to make these small changes for C++
> compatibility?
> It would also be nice if you would include:
>
> #ifdef __cplusplus
> extern "C" {
> #endif
>
> at the beginning and one to match at the end, but this can always be
> done
> by the host program.
sure, no prob.
Josh
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
More information about the Flac-dev
mailing list