• 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: Graham Reitz <email@hidden>
  • Date: Fri, 23 Nov 2007 23:15:05 -0600

Thanks Nick,

I completely missed your reply. Sorry about that. Yea, that seems to be the case, which is ok. I can work with it.

instead of including the library in the Xcode project, writing out the full path to the static library in the OTHER_LDFLAGS setting.

What would that look like for reference?

-l/somepath/a_static_lib  ?

Kindly,
graham

On Nov 22, 2007, at 3:22 PM, Nick Zitzmann wrote:


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

  • Prev by Date: Re: How do you get Xcode to statically link libraries?
  • Next by Date: Re: How do you force an Xcode C++ tool to statically link to a library?
  • Previous by thread: Re: 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