Xcode and static linking - not possible?

Jules Colding colding at 42tools.com
Tue Jun 17 05:12:14 PDT 2008


Hi,

I can not get Xcode 3.0 to link statically. I have (among others) the  
following libraries in "/opt/local/lib":

-rwxr-xr-x  2 root  admin  371916  4 Jun 13:59 libORBit-2.0.1.0.dylib
lrwxr-xr-x  1 root  admin      22  4 Jun 13:59 libORBit-2.0.dylib ->  
libORBit-2.0.1.0.dylib
-rw-r--r--  2 root  admin  523632  4 Jun 13:59 libORBit-2.a
lrwxr-xr-x  1 root  admin      22  4 Jun 13:59 libORBit-2.dylib ->  
libORBit-2.0.1.0.dylib
-rwxr-xr-x  2 root  admin    1077  4 Jun 13:59 libORBit-2.la


I want to link with "libORBit-2.a". I went about doing that by adding  
the library to the "External Frameworks and Libraries" folder in my  
Xcode project. Building the binary goes fine but when inspected with  
"otool -L" it is shown that it links against "libORBit-2.0.dylib" -  
not the static library.

Is there any way I can persuade Xcode to link the binary with the  
static library?


Thanks a lot in advance,
   jules



More information about the MacOSX-dev mailing list