Open janstary opened 3 weeks ago
Compare to what e.g. FLAC does: it also has an include subdir,
but e.g. FLAC/metadata.h
and all the other header files
include "format.h"
, not <format.h>
,
and do the same with every other file.
So you can just #include FLAC/all.h
in your source,
as opposed to adding $INCDIR/FLAC
to your -I path.
libopusfile installs its header as
opus/opusfile.h
under the include dir. That means it ends up in theopus/
subdirectory along with the headers of the other opus libraries, namely libopus and libopusenc.Now,
opus/opusfile.h
itself includes<opus_multistream.h>
, a header file of libopus. Note the<angle>
notation, as opposed to#include "opus_multistream.h"
in e.g.opus/opus_projection.h
of libopus itself.The problem is that you cannot just
#include <opus/opusfile.h>
in your source and be done with it, because, at least with clang:For comparison, you don't have that problem with
#include <opus/opus.h>
, as that includes"opus_multistream.h"
, not<opus_multistream.h>
.A workaround is to add
$INCDIR/opus
to your include path (-I
) and#include <opusfile.h>
instead. Then<opus_multistream.h>
is found, because it's in$INCDIR/opus
too.But that makes opusfile the odd one out: no other include file does that, so opusfile is the only one requiring this workaround.