• 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 4: Getting Library Search Paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Xcode 4: Getting Library Search Paths (From: Andreas Grosam <email@hidden>)

  • Prev by Date: Xcode 4: In-project file references with platform specific names not resolved
  • Next by Date: Re: Custom build location from Xcode 3 not editable in Xcode 4
  • Previous by thread: Xcode 4: Getting Library Search Paths
  • Next by thread: opening external files in same window
  • Index(es):
    • Date
    • Thread