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:
http://lists.apple.com/mailman/options/xcode-users/email@hidden