August 2011
Intermediate to advanced
552 pages
23h 48m
English
Earlier in the chapter, the class Unix tools ar and ranlib were used to build static libraries, and gcc was used to build a dynamic library. Mac OS X has a tool, libtool, which is peculiar to the platform, but provides a superset of features over ar and friends. The GNU project also has a libtool, but it is unrelated to the one in Mac OS X.
Make a static library like this and use it:
$ libtool -static -o libaddum.a src?.o$ gcc -g -o useadd useadd.m -L. -laddum
And dynamic libraries (but not bundles) can be created thusly:
$ libtool -dynamic -macosx_version_min 10.5 -o libaddum.dylib ...Read now
Unlock full access