Xcode and static linking - not possible?
Christiaan Hofman
cmhofman at gmail.com
Tue Jun 17 09:50:41 PDT 2008
<http://developer.apple.com/qa/qa2006/qa1393.html>
(I didn't know that, I just googled "xcode static library").
Christiaan
On 17 Jun 2008, at 2:12 PM, Jules Colding wrote:
> 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