[vorbis] Getting started with vorbisfile_example.c (MS VC 6)

James Boer james.boer at gte.net
Thu Jun 27 12:20:03 PDT 2002



>
> Also, as we are hardware engineers, our knowledge about dll's and static
> libraries is limited.  We have tried a google search but didn't find
> anything relevant. Could anybody direct us to a website which explains
> their function, and what Windows uses them for?
>

There's probably something that explains this at msdn.microsoft.com, I would
think.  In any case, here's a VERY brief overview of static vs dynamic
libraries in Windows...  :)

A static library is a module of compiled code that is merged with your own
program's code at link time to produce a single executable (specially
formatted machine code).  You may divide your own code into different
libraries, or you may be using 3rd party libraries (in fact, if you are
writing a C or C++ program, it's almost guaranteed that you will be using
SOME 3rd party libraries), such as Vorbis or the C-runtime libraries.

A DLL, or Dynamic Link Library, is another form of a library (it's actually
a specialized form of executable code), but instead of directly merging (or
linking) the code with your executable, the DLL remains a separate entity.
Windows (and other operating systems do this too) will intercept and route
procedural calls to the DLL, automatically loading and unloading it as
necessary.  This is made easiest by statically linking to a DLL-specific
"stub" library, which tells your program how to locate the producures in the
DLL.  That's why you still have to link to a small static Vorbis library
even though you are using the DLL libraries.  These "stubs" handle the
details of communicating with the DLL, making the process seamless to you.
There are ways to do this manually, but there's no need to get into this,
especially for your purposes.  In order for an executable that uses DLLs to
run, the required DLLs must be located somewhere in the Windows search path.
It typically starts by looking in the same directory as the executable is
located, then moves on to other places such as the Windows system directory,
etc.

<p><p><p><p>--- >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-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 mailing list