Re: Linking a static (.a) library into a framework
Re: Linking a static (.a) library into a framework
- Subject: Re: Linking a static (.a) library into a framework
- From: Eric Albert <email@hidden>
- Date: Fri, 29 Oct 2004 13:53:11 -0700
On Oct 29, 2004, at 1:48 PM, Mike Laster wrote:
How do I go about linking a framework against a static .a library?
I'm trying to build a set of Objective-C wrappers around Spread
(http://www.spread.org), but I don't want to introduce added dynamic
dependancies.
I have a framework called Spread.framework that has my wrapper classes
and links libspread.a which
is part of the project.
However, whenever I build it, Xcode seems to link
/usr/local/libspread.dylib instead of the libspread.a which I told it
to use. How to I make Xcode use the static library and not the
dynamic one?
Pass the -search_paths_first flag to the linker. From the ld man page:
-search_paths_first
By default when the -dynamic flag is in effect, the
-lx and
-weak-lx options first search for a file of
the form
`libx.dylib' in each directory in the library search
path, then
a file of the form `libx.a' is searched for in the
library
search paths. This option changes it so that in
each path
`libx.dylib' is searched for then `libx.a' before the
next path
in the library search path is searched.
Hope this helps,
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden