Re: Xcode 4: Getting Library Search Paths
Re: Xcode 4: Getting Library Search Paths
- Subject: Re: Xcode 4: Getting Library Search Paths
- From: Andreas Grosam <email@hidden>
- Date: Thu, 31 Mar 2011 13:45:45 +0200
On Mar 30, 2011, at 3:33 PM, Andreas Grosam wrote:
> Hi All!
>
> Is there a way to get the library search paths from the linker in the transcript (or elsewhere) when linking?
> (similar like getting the include search paths by adding the C-flag -v)
Found it out myself:
Specifying the flag `-Xlinker -v' in "Other Linker Flags" (OTHER_LDFLAGS) setting in the "Linking" section in the Build settings of the target.
The -Xlinker flag is a compiler option which passes the subsequent specified flag to the linker driver. I mistakenly assumed that Xcode 4 would automatically do pass specified linker flags (here `-v') as appropriate to whatever tool it invokes in order to have the ld tool get the specified flag. Well, it doesn't do it. The linker is invoked indirectly via the compiler tool (here clang) and thus in order to pass linker options we need to pass them with the -Xlinker compiler option followed immediately by the desired linker option (which is set in the "Other Linker Flags" build settings), which are in fact "compiler options", not "linker options".
Andreas
_______________________________________________
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