cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: run time error

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 22 Aug 2001 09:09:18 +0200 (MET DST)

On Tue, 21 Aug 2001, Jimmy Tam wrote:

> I installed curl and libcurl is located in /usr/local/curl/
>
> Here is my makefile
>
> CC=gcc
> CFLAGS = -I../include -c
> LD = ld
>
> # This should point to a directory that holds libcurl, if it isn't
> # in the system's standard lib dir
> # We also set a -L to include the directory where we have the openssl
> # libraries
> LDFLAGS = -B dynamic -G -L/usr/local/curl/lib -L/usr/local/ssl/lib
> -L/usr/local/lib/
>
>
> all: ibill.so
>
> ibill.so: ibill.o
> $(LD) $(LDFLAGS) -o ibill.so ibill.o
>
>
> # We need -lcurl for the curl stuff
> # We need -lsocket and -lnsl when on Solaris
> # We need -lssl and -lcrypto when using libcurl with SSL support
> # We need -ldl for dlopen() if that is in libdl
> # We need -lpthread for the pthread example
> LIBS = -lcurl -lsocket -lnsl -lssl -lcrypto -ldl

The LIBS variable isn't used anywhere, so your link line above is incomplete.

Set LIBS before you link your program and then link with a line similar to:

        $(LD) $(LDFLAGS) $(LIBS) -o ibill ibill.o

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-08-22