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
|