[flac-dev] FLAC won't allow project to build due to assert.h
Erik de Castro Lopo
mle+la at mega-nerd.com
Sun May 19 06:59:51 PDT 2013
Nikos Chantziaras wrote:
> I was looking into adding support for FLAC in my audio library, but
> there's a problem. Simply adding the output of:
>
> pkg-config flac --cflags
>
> to the compiler flags so that FLAC's headers can be found will break my
> build with errors like:
>
> error: 'assert' was not declared in this scope
>
> The problem is that /usr/include/FLAC has an "assert.h" header. In my
> C++ project, I have:
>
> #include <cassert>
>
> The cassert header (part of the standard C++ library) will internally
> include assert.h. But it ends up including the one from FLAC.
>
> I'm stuck. What do I do?
First of all, this is fixed in the next release.
Secondly, what I do for libsndfile with the current release is to remove
the FLAC component of the include path provided by pkc-config and then
include flac headers as <FLAC/headher.h>
HTH,
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
More information about the flac-dev
mailing list