Trouble with static linking
Trouble with static linking
- Subject: Trouble with static linking
- From: "Carter R. Harrison" <email@hidden>
- Date: Thu, 28 Jun 2007 18:18:40 -0400
I'm having some trouble statically linking libcurl in my Cocoa
project. I could really use some help. Here's what I've done so far.
1. Downloaded the source for curl (most recent version is
7.16.something). Built it according to the instructions (./
configure, make, make install). The result was that I have libcurl.a
sitting in /usr/local/lib.
2. Copied libcurl.a into my project, placing it in /Frameworks/Other
Frameworks (maybe I should be putting it under /Frameworks/Linked
Frameworks? is there a difference?).
3. Added a "Copy Files" build phase to my project. Put libcurl.a as
a file to be copied in this phase. The destination for the copy
files phase is "Frameworks".
4. Tried to build the project and it failed. I forgot to include
curl.h. So in my project settings I change the "Header Search Paths"
field to "/usr/local/include/curl". Clean All, and it builds
successfully.
5. libcurl has a method that will spit out it's version (I need a
feature in one of the more recent builds of libcurl which is why I'm
trying to link statically since OS X uses an older version). When I
run my app libcurl spits out 7.13.1 which is NOT the version that
I've built and included in my project.
So my question is, what am I doing wrong? Somehow including these
files have allowed my project to build, but it appears that my app is
still using OS X's libcurl.
Thanks in advance.
_______________________________________________
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