[flac-dev] FLAC won't allow project to build due to assert.h

Nikos Chantziaras realnc at gmail.com
Sun May 19 01:53:22 PDT 2013


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?



More information about the flac-dev mailing list