Problem: The relationships between the various search path settings baffle me. There are Preference panels for both the Target and the Project (can’t figure out which has priority over the other); within those there are settings for the SDK Path and Library Search Paths. When I try to link to a library (say, xyz.dylib) in /usr/local/lib, it appears that it is not sufficient to simply add this path to the Library Search Paths: the link editor complains that it can’t find /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/xyz.dylib . No surprise there, because the SDK Path setting says that the SDK path is prepended before all library paths. But when I put “../../../usr/local/lib” in Library Search Paths, the linker complains that it can’t find “../../../usr/local/xyz.dylib.” Huh? Where’s the prepend? Harrumph.
Kludge: Put “/usr/local/lib” in Library Search Paths and create a symbolic link to that directory:
% cd /Developer/SDKs/MacOSX10.4u.sdk/usr
% ln -s /usr/local ./local
XCode’s linker now finds the library OK.