Re: How Do I Statically Link to libcurl?
Re: How Do I Statically Link to libcurl?
- Subject: Re: How Do I Statically Link to libcurl?
- From: Shawn Erickson <email@hidden>
- Date: Wed, 1 Jul 2009 14:18:19 -0700
On Tue, Jun 30, 2009 at 8:49 PM, Chris Tracewell<email@hidden> wrote:
>
> On Jun 30, 2009, at 6:43 PM, Kyle Sluder wrote:
>
>> dylib means "dynamic library"...
>>
>> Why do you need to link against libcurl statically? Not saying there
>> aren't valid use cases, but please present yours.
>
> I guess I assumed that static linking is prefered as it would include
> libcurl with the executable and thus ensure that the app would work
> consistently, even if someone had a different version or had deleted this
> library from their machine. In short it just seemed like a safe option, but
> I am un-educated in this regard, so it was my best guess. The deployment
> environment is fairly easy right now, about 10 machines, mostly 10.5 with
> Intel iMac and Powerbooks which I can tweak if needed, but in the future
> this may grow and so you get the picture.
Apple's API "contract" with application developers is at the library
level and not below that. If the SDK you compile against has the
libraries you need you should not attempt to statically link them into
your application. Additionally any libraries that you do statically
link should utilize system provided libraries themselves and not
attempt to dive down lower (aka kernel interface, etc.). A statically
linked version is not guaranteed to work on a future (or earlier)
version of the operating system. Apple takes strong measures to ensure
the dynamic libraries they provide will work on each of the operating
system they ship on while not breaking compatibility with existing
applications.
Review the documentation on "cross-development" on Apple's developer site.
http://developer.apple.com/documentation/developertools/Conceptual/cross_development/Introduction/CrossDevelopment.html
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden