[Vorbis] Re: Oggenc/oggdec on Mac OS X

Mikael Hillborg mikael at mhc.se
Wed Nov 16 23:42:51 PST 2005


"Adam D. Moss" wrote:
> 
> Daniel Mario Vega wrote:
> >> 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).
> 
> That should not be true - at least, it is not true here on x86
> with a really crusty old gnu ld and toolchain, where only objects
> with referenced symbols end up in the executable.
> 
> --Adam

The objects (libs) are indeed referenced (that's why they need to be
included, because they are referenced). So they are included.
 
The executable is 28 KB when it's linked dynamic and 500 KB when 
it's linked static. And I have tested the static one by uninstalling 
all dynamic and static libraries after the executable was built, 
just to ensure that the libs were included and it works fine. 

Mike



More information about the Vorbis mailing list