• 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: Chris Espinosa <email@hidden>
  • Date: Sun, 21 May 2006 23:50:34 -0700

On May 21, 2006, at 11:38 PM, Jerry Krinock wrote:

I have an app project that included a private framework, and the framework

in turn included the sqlite dynamic library which comes with Tiger.


This all worked fine, until I discovered that the sqlite dylib packaged in

Tiger is an old version that had some limitations.  So I compiled a new

version, removed Tiger's sqlite from my private framework, and added my new

sqlite dylib in its place.


Result:  The private framework compiles with no problems, but now my app

project gives a link error:


/usr/bin/ld: warning can't open dynamic library:

/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libsqlite3.dylib referenced

from: 

/Users/jk/Documents/MyApp/../MyFramework/build/Release/MyFramework.framework

/MyFramework


Of course it can't find it.....


The actual path to Tiger's old sqlite dylib is:

/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libsqlite3.0.dylib


The actual path to my new sqlite dylib is:

../sqlite3/build/Release/libsqlite3.dylib


But Xcode is looking for this nonsense:

/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libsqlite3.dylib


And indeed there is no such thing.  That path is almost the Tiger sqlite

dylib, except if you look carefully you see that it has added that path

component to directory "/local/ (which does not exist ) and also the

filename is my new dylib's filename (it lacks the ".0").


Now I have searched and searched all the settings in MyApp and MyFramework

to see where this nonsense could have come from; the only thing close is the

SDK Path which is "/Developer/SDKs/MacOSX10.4u.sdk".  "Get Info" on my new

sqlite dylib in Groups & Files correctly shows its actual path.


In both projects, I have added the correct path

"$(SRCROOT)/../sqlite3/build/Release" to "Library Search Paths", and checked

"Always Search User Paths" (even though this seems to affect only headers,

not libraries).  Still the same error.


Where should I be looking for this?


The best thing to do here is either to build against the copy of sqlite3 in your Intermediates directory, or to add a symlink from /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib to /usr/local/lib.

Xcode automatically adds the SDKROOT to all /usr paths, so any "installed" libraries you link against have to either be copied into Apple's SDK, or you have to link against them in their intermediate location.  The symlink is a convenient middle ground for "local libraries" in /usr/local.

Chris
 _______________________________________________
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>
    • Re: Xcode uses "SDK Path" instead of my "Library Search Paths" ?
      • From: Jerry Krinock <email@hidden>
References: 
 >Xcode uses "SDK Path" instead of my "Library Search Paths" ? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Xcode uses "SDK Path" instead of my "Library Search Paths" ?
  • Next by Date: Re: Newer GCC?
  • Previous by thread: 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