Re: Xcode uses "SDK Path" instead of my "Library Search Paths" ?
Re: Xcode uses "SDK Path" instead of my "Library Search Paths" ?
- Subject: Re: Xcode uses "SDK Path" instead of my "Library Search Paths" ?
- From: "Peter O'Gorman" <email@hidden>
- Date: Tue, 23 May 2006 13:50:50 +0900
On Mon, 2006-05-22 at 21:32 -0700, Jerry Krinock wrote:
> Well, I tried to fix it by building it as a static library instead of
> dynamic, and it built. Yahooooo! But when running, an NSLog of
> sqlite_version told me that the run-time was still loading old version 3.1.3
> from /System instead of my new static library. Darn it. Anybody know how
> to fix that?
If you build a local dynamic libsqlite then you need to run
install_name_tool on your executable so that the path to the sqlite
dynamic lib points to your libsqlite that you've included in your app
bundle, using @executable_path.
Alternatively, make sure that your static sqlite library is in the -L
paths first and use the -search_paths_first ld flag, or specify the full
path to the sqlite static lib instead of -lsqlite3.
> I read:
>
> "When you need to link with a custom version of a dynamic library but donĀ¹t
> want to replace the standard version of the library, you can use the
> -dylib_file option of the linker to tell it where to find the nonstandard
> version of the library."
>
> Hey now!! I think maybe that sounds just like what I want to do!!
> Continuing....
You do not want to use -dylib_file in this situation. It serves a
different purpose. If you are developing sqlite and you want to ensure
that your new version is used *at static link time* when the linker is
looking for symbols in dependent libraries, rather than the installed
version, they you should use -dylib_file. At runtime, the installed one
will still be used. The ld manpage explains this better than I just
failed to do.
Peter
Attachment:
signature.asc
Description: This is a digitally signed message part
_______________________________________________
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