• 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: Static library linking in the face of system dynamic libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Static library linking in the face of system dynamic libraries


  • Subject: Re: Static library linking in the face of system dynamic libraries
  • From: Philip Aker <email@hidden>
  • Date: Sun, 27 Jul 2008 00:45:37 -0700

On 08-07-26, at 12:38, Wade Williams wrote:

I'm feeling pretty stupid here, but I just feel like there's got to be a better solution to my problem.

I'm building a command-line tool which links with libcurl. It appears the /usr/lib/libcurl.dylib installed on OS X 10.5.4 has a bug in it.

Naturally, I downloaded the latest libcurl and built it using -- disable-shared and linked it statically to my project. But of course, that doesn't work - XCode will always link to the dynamic library if it finds on.

So:

1) I can't include a dynamic library inside my apps bundle. It's a command-line tool - there is no bundle.

2) As far as I know, the linker flag -static won't work because it then expects static link with everything include the c runtime, system frameworks, etc.

3) It appears the only solution is for me to rename the system- installed libcurl.dylibs on my system and remember to do that every time I build

Any chance at all I'm missing a simpler solution than renaming these libraries every time I build?


I think this is the problem that if you need to statically link, use the full path and/or specify the search path. There have been many posts on this topic so if you search in the archives for this month, you should be able to see if this is exactly your issue.


Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

_______________________________________________
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: 
 >Static library linking in the face of system dynamic libraries (From: Wade Williams <email@hidden>)

  • Prev by Date: Re: Globals variable problem
  • Next by Date: Re: Xcode 3.1 doesn't get an \f
  • Previous by thread: Static library linking in the face of system dynamic libraries
  • Next by thread: XCode 3.1 frequently hangs
  • Index(es):
    • Date
    • Thread