[vorbis-dev] #include scheme in vorbis project
Chris Wolf
cwolf at starclass.com
Wed Oct 10 10:51:44 PDT 2001
On 10/10/2001 at 7:13 PM Erik Olofsson wrote:
>
>Is that the way all libraries for *ix systems work? And can it be made
>compatible with a relative path methodology?
As far as how include files work with the preprocessor, there is absolutely no
difference between the Microsoft precompiler and any C preprocessor ported to UNIX.
It's all a matter of convention. Using relative include paths is still hard-coding the
location of the header file, which is undesirable for a number of reasons, especially
when you can specify the location of include directories with "-I", same as with gcc.
>
>-----Original Message-----
>From: Peter Harris [mailto:peter.harris at hummingbird.com]
>Sent: den 10 oktober 2001 18:41
>To: vorbis-dev at xiph.org
>Subject: Re: [vorbis-dev] #include scheme in vorbis project
>
>> 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?
>
>Yes, there is a good reason it is done that way. On most non-windows
>systems, the stuff under "../../vorbis/include" is moved to "/usr/include"
>or "/usr/local/include" at the time vorbis-lib is installed.
><vorbis/codec.h> is then the correct way to reference the installed header
>files.
>
>Reading your message headers, you appear to be on windows. Feel free to
>copy
>"vorbis\include\vorbis" to "c:\include\vorbis", if you want to create a
>'global include' sort of directory to mirror what you would have on a *ix
>system. Alternately, you could copy the files to %MSSdk%\inclcude\vorbis\
>(and %MSSdk%\include\ogg\ for the ogg headers), but you'd have to remember
>that you'd done that if you ever re-installed the SDK (or when Microsoft
>moves the default path and you don't notice... again...)
>
>> 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?
>
>Some of us would find it interesting. The real core developers say that
>there are more improvements to be made at the C level before they are going
>to bother with assembly. In addition, I imagine SSE optimisations would be
>a
>lot more interesting if they were done to a 1.0 tree.
>
>I would find it interesting from a 'How does one go about writing SSE by
>hand?' point of view. Practically, and for now, I'm happy with the ~20%
>speedup I get by compiling with Intel's C compiler with SSE turned on.
>YMMV.
>
>Peter Harris
>
>
>--- >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.
>
>--- >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.
--- >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