[gst-devel] location of include headers
Thomas Vander Stichele
thomas at urgent.rug.ac.be
Sun Jun 16 00:25:02 CEST 2002
I have looked at some other projects as to where they install their
headers and come to the conclusion that we might think about changing
The problem is fairly simple : some of our headers *need* to point to
other headers in the same package using < > which sets the compiler off
looking for headers in the standard locations and the user-supplied
locations. They *need* to do this because these headers get installed
system-wide and could thus be used by external apps as well.
The way I see it is that, you should use "..." if the header is in the
source tree only and not meant to be installed, and <...> if the header
you're doing this in is meant to be installed, as well as the header
you're pulling in.
Now, this causes problems. Take the editor for example. The
editor.h file in gst/editor is the entry point. It contains includes
like this :
So that, when an external app wants to work with the installed gst-editor,
this will correctly point to this other installed header.
Now, there's a problem with this, and that's why I suspect the other
projects (gtk, eel, pango, freetype, ...) use another level in their
The problem is this : when you already have a previously installed set of
header files, and you include them as <gst/editor/gsteditorbin.h>, the
installed set will take preference to be included, since they are in the
standard include prefix.
The other projects basically solve this by sticking in another level, so
that the dir from which everything starts needs to be EXPLICITLY added to
the compile lines.
So what does this mean for us ?
We could go two ways :
a) drop the gst/ prefix from all the #include lines and add
-I/$(prefix)/include/gst to all the compile lines that need it
b) put all gst header files in something like
$(prefix)/include/gstreamer and start the tree from there
(so that editor.h would end up in
I prefer b) since 1) we need to change less source code and 2) other
projects do it similarly.
I'm sure all of you have at some point been stung by things failing to
compile where the ultimate reason was that some old header stuff was
floating around. This should not be allowed to happen.
So, what do you think ? Agree ? Not ? If y'all agree I'll work on doing
this quickly. I'd prefer to get this done before 0.4.0.
The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
Ooh child I'll meet you child
On the sunny side it's alright
<-*- thomas at apestaart.org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/
More information about the gstreamer-devel