• 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: How do you force an Xcode C++ tool to statically link to a library?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you force an Xcode C++ tool to statically link to a library?


  • Subject: Re: How do you force an Xcode C++ tool to statically link to a library?
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 22 Nov 2007 13:22:34 -0800


On Nov 22, 2007, at 9:50 AM, Graham Reitz wrote:

I am trying to force xcode to statically link against the mysqlclient_r.a library but it prefers to look for the dylib first (see below). The dylib does exist but I can't get the application to look there.

Or another way would be to get it to look in the Library search path, which is where the dylib is instead of /usr/local/mysql/lib/ mysql. Can I put the dylib in the application directory?


That won't change a thing. The linker always prefers dynamic over static frameworks, and the only way to work around this is to, instead of including the library in the Xcode project, writing out the full path to the static library in the OTHER_LDFLAGS setting.

Nick Zitzmann
<http://seiryu.home.comcast.net/>
S/MIME signature available upon request




_______________________________________________ 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: How do you force an Xcode C++ tool to statically link to a library?
      • From: Graham Reitz <email@hidden>
References: 
 >How do you force an Xcode C++ tool to statically link to a library? (From: Graham Reitz <email@hidden>)

  • Prev by Date: Re: IB snap guides off by 1 pixel?
  • Next by Date: Re: IB snap guides off by 1 pixel?
  • Previous by thread: How do you force an Xcode C++ tool to statically link to a library?
  • Next by thread: Re: How do you force an Xcode C++ tool to statically link to a library?
  • Index(es):
    • Date
    • Thread