• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Linking a static (.a) library into a framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking a static (.a) library into a framework


  • Subject: Re: Linking a static (.a) library into a framework
  • From: Mike Laster <email@hidden>
  • Date: Fri, 29 Oct 2004 17:22:33 -0400

On Oct 29, 2004, at 4:53 PM, Eric Albert wrote:

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.

I'm giving up on the .a approach because it turns out they won't work with CVS. Once the file is committed, it becomes invalid and ranlib has to be run on it before it will work again :-(

I'm going down the road of using the .dylib now but it isn't working
correctly either.

For some reason, the linker isn't setting the full path to the .dylib file
and higher-level frameworks that link against Spread.framework fail
because they cannot find libspread.dylib:
otool -Lv Spread
Spread:
/Marketocracy/Frameworks/Spread.framework/Versions/A/Spread (compatibility version 1.0.0, current version 1.0.0)
time stamp 1099084681 Fri Oct 29 17:18:01 2004
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 500.56.0)
time stamp 1095214563 Tue Sep 14 22:16:03 2004
libspread.1.0.dylib (compatibility version 0.0.0, current version 0.0.0)
time stamp 1098987191 Thu Oct 28 14:13:11 2004
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 71.1.1)
time stamp 1092508094 Sat Aug 14 14:28:14 2004



Every other library has a fully qualified path, but for some reason libspread.1.0.dylib does not.


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Linking a static (.a) library into a framework
      • From: Eric Albert <email@hidden>
References: 
 >Linking a static (.a) library into a framework (From: Mike Laster <email@hidden>)
 >Re: Linking a static (.a) library into a framework (From: Eric Albert <email@hidden>)

  • Prev by Date: Re: Linking a static (.a) library into a framework
  • Next by Date: Re: Linking a static (.a) library into a framework
  • Previous by thread: Re: Linking a static (.a) library into a framework
  • Next by thread: Re: Linking a static (.a) library into a framework
  • Index(es):
    • Date
    • Thread