[Vorbis] RE: Oggenc/oggdec on Mac OS X
Daniel Mario Vega
dv5a at dc.uba.ar
Tue Nov 15 14:03:28 PST 2005
Ralph Giles wrote:
> You can force it to use static versions of specific libraries by passing
> the full path to the .a instead of the -lname option, which uses the
> standard search logic. For example,
>
> gcc -o oggenc oggenc.o foo.o -lvorbisenv -lvorbis -lm -logg
>
> would become
>
> gcc -o oggenc oggenc.o foo.o /usr/local/lib/libvorbisenc.a \
> /usr/local/lib/libvorbis.a /usr/local/lib/libogg.a -lm
>
> Try variations on that and see if you can get something to work.
>
That should work, the only problem is that the full library is included
in the final executable instead of only the needed/used library object
files (as a normal static linking would work).
Try this: gcc -o oggenc oggenc.o foo.o -static -lvorbisenc -lvorbis
-logg -shared -lm
Only libraries put between "-static" and "-shared" will be statically
linked. The others (including system libraries) will be linked dynamically.
Greetings ....
Disclaimer: I'm a Unix guy.
More information about the Vorbis
mailing list