[matroska-devel] Re: changing #includes ?

Ronald Bultje rbultje at ronald.bitfreak.net
Sun Jun 29 11:15:46 CEST 2003

Hey Moritz,

On Sat, 2003-06-28 at 18:49, Moritz Bunkus wrote:
> Why do we include all files directly?
> Meaning we have to '#include <KaxTags.h>' and don't '#include
> <matroska/KaxTags.h>'. My guess is that on Windows it's simply done this
> way, but for Unix/Linux and all Unix-alike systems this is very
> unnatural as you always have to specify the include paths for those two
> directories:
> g++ -I/usr/include/ebml -I/usr/include/matroska ...

It's not that easy. ;). Installing include files in the direct system
include path is something you should prevent as much as possible. Think
of glib-2.0 ($(includedir) = /usr/include/glib-2.0/), etc. The reason is
that this allows you to install different versions without having the
chance that one of them will be chosen while you wanted another one
(possibly because the include path for the previous one was also given
by the include path of another dependency library), since you always
have to indicate the specific include path for this installed version.

So no, I'd recommend to keep it in a subdir of $prefix/include/, not in
$prefix/include/ directly.

I do think that it'd be a good idea if there was one generic include
file, like Kax.h, which included all the other .h files. That'd make app
developer's life a lot easier already. :).


Ronald Bultje <rbultje at ronald.bitfreak.net>
Linux Video/Multimedia developer


More information about the Matroska-devel mailing list