cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: library path or makefile issue?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 23 Mar 2002 17:15:01 +0100 (MET)

On Sat, 23 Mar 2002 theexperts_at_allprodirect.com wrote:

> Newsflash: I think I have narrowed the problem down to the compile
> command!!!
>
> curl-config --cflags:
> -I/usr/local/include

You got this output from a 'curl-config' that was installed in your system,
not by you. Thus, this probably reports the path to the former installation.

When you install a local copy of curl and libcurl should most likely do it
this way:

$ ./configure --prefix=$HOME
$ make
$ make install

Then you make sure you have $HOME/bin in your path very early, and before
/usr/local/bin etc. Then, curl-config would've told you the right paths. The
lib will end up in $HOME/lib and that's the path you should use for your -L
flags when you compile.

> All this thoroughness made me realize: the paths are wrong! Try:
>
> gcc -o test.cgi test.c -I/home/myfolder/curl-7.9.5/include
> -L/home/myfolder/curl-7.9.5/lib -lcurl
>
> Compiles but still doesn't work.

Try 'ldd test.cgi' and you'll see which libs it wants.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-03-23