Linker woes
Linker woes
- Subject: Linker woes
- From: Tim Murison <email@hidden>
- Date: Tue, 12 May 2009 16:41:43 -0400
- Thread-topic: Linker woes
Hi,
I'm trying to resolve a problem I'm having with XCode during the link phase
of one of my libs. The circumstances are rather complicated, so I'll try to
explain as best as I can.
My project outputs all dylibs to a folder "build/Debug/Libraries". I have 2
xcode projects, main and common.
common creates a bunch of dylibs used in main.
main also creates a bunch of dylibs.
Here's the problem. Within main I have a dylib, "mylib", and some unit tests
for it, "myLibTests". "myLibTests" must link against "mylib". Furthermore,
"myLibTests" is output in "build/Debug/Tests". When compiling "myLibTests",
XCode generates a gcc command that uses the absolute path to "mylib.dylib".
The problem is the absolute path is wrong.
"mylib.dylib" exists in "build/Debug/Libraries" whereas "myLibTests" exists
in "build/Debug/Tests". The path XCode generates to "mylib.dylib" is
"build/Debug/Tests/mylib.dylib" instead of
"build/Debug/Libraries/mylib.dylib". To make matters worse, "myLibTests"
also links against libraries from the common project, these all have the
correct path.
I'm using a common xcconfig across both projects, so I know all the build
settings are the same for the libraries in main as the ones in common. I
have set CONFIGURATION_BUILD_DIR to "build/Debug/Libraries" in the xcconfig,
and it shows up correctly when inspecting the target properties for all my
dylibs.
Does anyone know what I'm doing wrong, or how to tell XCode to use relative
paths in the linker command so I can configure the correct behaviour myself?
Cheers,
-Tim
_______________________________________________
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