Why does macports build static libraries?

Jochen Küpper jochen at fhi-berlin.mpg.de
Sat Jun 9 11:52:56 PDT 2007


On 09.06.2007, at 17:50, Watson Ladd wrote:

> I was looking on /opt/local/lib and found a lot of static  
> libraries. But
>  Apple recommends against compiling static libraries except as
> intermediates during the build process. Why does macports do this?

Most Unix projects build static and dynamic libraries by default,  
then you can later use what you want...

> Second question:How do I ensure I am linking against the dynamic  
> versions?

Typically nothing -- they are used by default. You can check that for  
a specific binary with otool, for example I get the following:

 > otool -L /opt/local/bin/gawk
/opt/local/bin/gawk:
         /opt/local/lib/libintl.8.dylib (compatibility version 9.0.0,  
current version 9.0.0)
         /opt/local/lib/libiconv.2.dylib (compatibility version  
7.0.0, current version 7.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.3.4)
         /System/Library/Frameworks/CoreFoundation.framework/Versions/ 
A/CoreFoundation (compatibility version 150.0.0, current version  
368.27.0)

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen- 
Kuepper.de
     Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
         Sex, drugs and rock-n-roll


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.macosforge.org/pipermail/macports-users/attachments/20070609/1228d5f8/PGP.bin


More information about the macports-users mailing list