cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Newbie Darwin Question

From: Toby Peterson <toby_at_apple.com>
Date: Tue, 15 Aug 2006 13:04:15 -0700

On 15 August 2006, at 06.59.11, Dean Shavit wrote:

> OK, maybe I didn't make my "Newbieness" clear enough.
>
> I am new to C programming. A tip or example of linking and variable
> declaration would be very helpful.

Doesn't have anything to do with C, just basic Xcode usage. Lots of
documentation at http://developer.apple.com/tools/xcode/

Assuming it's a normal Xcode project, look under: Targets -> (target
name) -> "Link Binary with Libraries". Then just add the necessary
libraries (libcurl.dylib, in this case) to that section.

- Toby

> On Aug 15, 2006, at 3:32 AM, Daniel Stenberg wrote:
>
>> On Tue, 15 Aug 2006, Dean Shavit wrote:
>>
>>> I'm planning on writing a command-line tool for Darwin that uses
>>> libcurl and I am having a little trouble getting the "handle"
>>> from the curl_easy_init() function.
>>
>>> Building this in Xcode results in the following error:
>>>
>>> ZeroLink: unknown symbol '_curl_easy_init'
>>
>> Then you didn't link with libcurl.
>>
>>> main.c:10: error: 'handle' undeclared (first use in this function)
>>
>>> CURL *curl_easy_init();
>>> CURLcode res;
>>> handle = curl_easy_init();
>>
>> You need to declare variables before you can use them.
>
>
>
>
Received on 2006-08-15