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

Static library linking in the face of system dynamic libraries


  • Subject: Static library linking in the face of system dynamic libraries
  • From: Wade Williams <email@hidden>
  • Date: Sat, 26 Jul 2008 14:38:34 -0500

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?

Thanks,

Wade
 _______________________________________________
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: Static library linking in the face of system dynamic libraries
      • From: Philip Aker <email@hidden>
  • Prev by Date: Re: Globals variable problem
  • Next by Date: Re: Globals variable problem
  • Previous by thread: Re: image size problem
  • Next by thread: Re: Static library linking in the face of system dynamic libraries
  • Index(es):
    • Date
    • Thread