cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to build libcurl

From: Guenter <lists_at_gknw.net>
Date: Thu, 20 Aug 2009 18:52:37 +0200

Hi Sumana,
Kamil Dudka schrieb:
> On Thursday 20 of August 2009 16:30:07 sumana ts wrote:
>> Hi,
>> Even if i try "gcc -L /usr/lib/libcurl.so myapp.c",also throws undefined
>> symbol reference.
>> As long as iam using '-lcurl' option,everything works fine(either libcurl
>> source or the linux installed libcurl).
>>
>> I feel '-L' is to link to the specified library and -lcurl is the option
>> which tells the linker to pick the symbols from curl which are
>> not there in the library path specified with '-L'.So in both the cases
>> whether i build libcurl on my own or take from the OS,
>> i have to use -lcurl.Am i correct?
>
> That's completely wrong!
>
> You should read the manual:
> http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Link-Options.html#index-Libraries-888
>
> In your example it would be "gcc myapp.c -lcurl -L/usr/lib". The output is
> a.out (if not overridden by -o).
it seems to turn out that you have zero knowledge about compiling at
all, and dont even understand what we all explained to you.
Since your probs will occure with any other external library usage I
suggest that you start learning how compilation and linking works, and
if you have questions then first read the manual, second read the
manual, and third read the manual (in your case for gcc and ld /
binutils), and then post your remaining questions in a forum for
beginners. None of your questions really belong here to this list.

Gün.
Received on 2009-08-20