curl-library
Re: library path or makefile issue?
Date: Sun, 24 Mar 2002 18:41:05 +0100 (MET)
On Sat, 23 Mar 2002 theexperts_at_allprodirect.com wrote:
> inserted $HOME/bin at front of path in .cshrc file. now curl-config works
> without specifying path!
>
> $ curl-config --version
> libcurl 7.9.5
>
> $ curl-config --cflags
> -I/home/myfolder/include
>
> $ curl-config --libs
> -L/home/myfolder/lib -lcurl -ldl -lsocket -lnsl
>
> changed the lines in curl.h to read:
You don't need to change any source lines in the normal headers now with the
paths setup fine.
> #include </home/myfolder/include/curl/types.h>
> #include </home/myfolder/include/curl/easy.h>
>
> changed my c program to read:
> #include </home/myfolder/include/curl/curl.h>
The "right" way of doing this is to:
#include <curl/curl.h>
As you point out the /home/myfolder/include directory with -I.
> gcc -otest.cgi test.c -I/home/myfolder/include -L/home/myfolder/lib -lcurl
> -ldl -lsocket -lnsl
That looks correct.
You should in fact also be able to compile with a line like this:
$ `curl-config --cc --cflags --libs` -o test.cgi test.c
(not that it really matters)
> compiles with no errors. program still produces no output.
You mean when you run it as:
$ ./test.cgi
?
> can't seem to use ldd...
> $ ldd test.cgi
> ldd: Command not found.
> If ldd comes with the c compiler, then the reason it won't work is my host
> does not have all of the components installed.
It doesn't, ldd comes with the operating system on Solaris 2.7. My solaris
2.7 has it in /bin/ldd and /usr/bin/ld...
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-03-24