[Openal-devel] freealut 1.0.0 release candidate 1
Matze Braun
matze at braunis.de
Sun Dec 4 13:28:52 PST 2005
Am Sonntag, den 04.12.2005, 18:25 +0100 schrieb Sven Panne:
> Am Samstag, 3. Dezember 2005 19:12 schrieb Prakash Punnoor:
> > > proposed and change the README and alut.html accordingly. Furthermore, I
> > > think that the output of "openal-config --libs" is missing a lot of
> > > things: The other libraries libopenal.so depends on (libvorbis, libartsc,
> > > ...), a flag for using pthreads, etc. I'll take a lot at that, too.
> >
> > Are you sure? For me it works just specifiying -lopenal -alut to compile
> > test progs, regardless what was compiled into openal.
>
> I think the big question is: What should "alut-config --libs" / "pkg-config
> --libs alut" report? Only the direct library dependencies or their transitive
> closure? Looking at some examples on my Linux box I must admit that currently
> I don't have a clue, as there seems to be no standard here. :-( But
> pkg-config has a Requires: field, hmmm...
>
> We have to consider 2 cases here:
>
> * Dynamic linking: The capabilities of different platform vary quite a lot
> here (that's the whole point of libtool, BTW), with e.g. Linux being one of
> the easiest to use. As an example: To compile and link a GLUT application on
> Linux it suffices to state a single "-lglut" flag, all the libraries GLUT
> depends on (OpenGL, GLX, X11, ...) are figured out automatically, because
> every dynamic library knows the libraries itself depends on. In our case:
> "-lalut" is enough, plus perhaps "-pthread".
>From an application programmers point of view you should mention all
libraries that you use directly in your app. So if you use OpenGL calls
then just linking to -lglut is wrong because in another universe glut
could not be linked against OpenGL and your app will fail then (there
are probably more realistic examples than that :)
I assume using "Requires: openal" in the .pc file is the right thing to
do (although the pkgconfig docu doesn't state clearly what requires
means). Dependencies whose API is not directly exported to ALUT and
whose headers are not included in the public headers like vorbis should
not be mentioned.
>
> * Static linking: Here things are normally quite different, you have to
> specify the transitive closure of *all* libraries in the right order.
At least pkg-config is useless for static linking anyway
Greetings,
Matze
More information about the Openal-devel
mailing list