Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static libraries



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

james tittle wrote:
| ...just thought I'd mention a simple (non-xcode) way around this:   just
| create a folder called "libs" or "staticlibs" and fill it with  symbol
| links ("ln -s /path/to/staticlib.a staticlib.a") to your
| favorite/needed static libraries...then just include the path to this
| folder when linking...this makes all the dylib mix up go away :-)
|

Hi,

This will not work if you have a dylib installed somewhere else along the
linker search path. Ld , by default, searches all of its search paths for
files of the form lib<name>.dylib, then starts again at the beginning and
looks for lib<name>.a. the -search_paths_first flag was added at some point
to allow this to work. With this flag specified, ld will look in each of its
search paths for lib<name>.dylib, then lib<name>,a before moving on to the
next path.

i.e. your system, with -search_paths_first works fine.

Peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iQCVAwUBQ145jriDAg3OZTLPAQLdJwP+LJgL/F4LCJfo/SA9JYFPPxzEUtPFNDhv
LJ8Fp6g6YHxJUFLKRqygM7k/x6y4tFrKIm0o1Xb8TtvQCFbQiqh0v/rmqptbFrn3
QJCCsd+qKNrmDi7ThIEGXD8AfWvt9HFORs+S6D1Pf/Fdjf5qMyVpZSMkR2qdQrGZ
XMnvA659yj8=
=Fx6e
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >static libraries (From: Steve Checkoway <email@hidden>)
 >Re: static libraries (From: Andreas Grosam <email@hidden>)
 >Re: static libraries (From: Steve Checkoway <email@hidden>)
 >Re: static libraries (From: james tittle <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.