[vorbis-dev] #include scheme in vorbis project
Chris Wolf
cwolf at starclass.com
Wed Oct 10 10:41:05 PDT 2001
Actually it is more "plug and play" to use the angle brackets -- the same source can be
compiled different environments and the header files are not location dependent.
It's not just the library code that includes those headers, the application code needs to
include some of them as well. Are you going to edit all those files and change the relative paths
any time you want to move the source, relative to the include directory? What about when
moving the header files?
> This is especially important in large projects.
Why? Windows has a number of quirky differences, from other development environments, but
one good thing it does have, is the precompiled code mechanism (PCH files) which, among other things,
caches compiler settings such as include paths. Are you using precompiled headers? I have that
feature turned off for vorbis itself, because it's overkill for the size of ogg/vorbis, however if your project
is that big, you might consider it.
I strongly recommend checking out the "win32sdk" module and take a look at some of those project files,
which accommodate angle include files without any problems. I don't think we want to hard-code header
file locations.
On 10/10/2001 at 5:40 PM Erik Olofsson wrote:
I'm trying to implement vorbis into our game engine as a substitute to mp3 and wma encoding. And I have some questions/suggestions in how #includes are done in vorbis.
Right now ogg and vorbis stuff relies on ogg and vorbis include paths being in global (or local) include path environment. This could easily be avoided by using relative includes in vorbis:
#include "..\..\vorbis\include\vorbis\codec.h"
instead of
#include <vorbis\codec.h>
This allows the include of vorbis and ogg .h files to be more plug and play and you can add the .c files of the library directly to a project without defining extra include paths. This is especially important in large projects. Right now its pretty easy for me to just modify the code in ogg vorbis to work this way, but it seems unnecessary. Is there a really good reason that you have it the way it is right now?
Also if the test of vobis codec works out ok here I may be able to contribute with optimizations in the form of SSE code and so on, has this already been done / is in the process of being done. Is this something that you are interested in?
Regards,
Erik Olofsson
Starbreeze Studios / O3 Games
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list