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: Random /usr/lib/libsqlite3.0.dylib Linking in Release Mode ONLY




On Aug 7, 2006, at 10:20 PM, Robert Sesek wrote:

When I stick my static library (libsqlite3.a) in the Frameworks section, Xcode does the inexplicable and magically adds -lsqlite3 into the Ld phase. When I remove that file, though, that flag goes away from the transcript. I can't quite figure out why this is.

I noticed this item in the Xcode 2.4 release notes:

Better linking support

When linking against a framework or library, which is referenced via a project reference, Xcode will now properly track changes to and dependencies on the framework or library and re-link if it changes. Moreover, it will pass to the linker the full path to the referenced binary so that search paths are not necessary in order to link against it. In the event that you wish to use a search path to link against it, the recommended solution is to create a standalone reference to the file rather than using a reference which comes from a project reference.

So if your static library is being built in the same Xcode project as your applications, perhaps one solution would be to upgrade to Xcode 2.4 and make sure that you're using a project reference to refer to the static library.

Alternatively, you could probably add a Copy Files build step that copied the library to a different name, and then link with that. If your version of the library had a unique name, I don't see how Xcode could confuse it with the built-in version.


Best wishes,

--Stuart A. Malone
  Llamagraphics, Inc.
  Makers of Life Balance personal coaching software


 _______________________________________________
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: 
 >Random /usr/lib/libsqlite3.0.dylib Linking in Release Mode ONLY (From: Robert Sesek <email@hidden>)
 >Re: Random /usr/lib/libsqlite3.0.dylib Linking in Release Mode ONLY (From: Chris Espinosa <email@hidden>)
 >Re: Random /usr/lib/libsqlite3.0.dylib Linking in Release Mode ONLY (From: Robert Sesek <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.