• 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: Xcode uses "SDK Path" instead of my "Library Search Paths" ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Xcode uses "SDK Path" instead of my "Library Search Paths" ?
      • From: Jerry Krinock <email@hidden>
References: 
 >Re: Xcode uses "SDK Path" instead of my "Library Search Paths" ? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Xcode uses "SDK Path" instead of my "Library Search Paths" ?
  • Next by Date: Re: Discard Changes on project
  • Previous by thread: Re: Xcode uses "SDK Path" instead of my "Library Search Paths" ?
  • Next by thread: Re: Xcode uses "SDK Path" instead of my "Library Search Paths" ?
  • Index(es):
    • Date
    • Thread