cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: undefined symbols

From: Danny Horswell <dhorswell_at_3-s.co.uk>
Date: Fri, 24 Nov 2000 09:15:55 -0000

Jonatan,

This is exaclty the same problem I had, In the end I changed the order of
linking the libs
in my project linking and it linked fine.

Here is my make file that worked you should be able to change the link order
to your makefile to make it work.
Why the changing the order of the linking worked when it did not before
still baffles me.

Regards Danny

CFLAGS =

GTKCFLAGS = 'gtk-config --cflags'

OLDGTKLIBS = -L/usr/X11R6/lib -lgtk -lgdk -lgmodule -lglib -lXi -lXext
-lX11 -lm -L/usr/lib -lxml -lcurl -lssl -lcrypto -ldl

GTKLIBS = -lcurl -L/usr/lib -L/usr/local/ssl/lib -lssl -lcrypto -ldl -lgtk
-lgdk -lxml

all:Window

Window: Window.o XMLRead.o Errors.o MString.o CURL.o
        g++ Window.o
 MString.o XMLRead.o Errors.o CURL.o $(CFLAGS) -o $@ $(GTKLIBS)
                
Window.o: Window.cc
        g++ -c Window.cc
        
XMLRead.o: XMLRead.cc
        g++ -c XMLRead.cc
        
Errors.o: Errors.cc
        g++ -c Errors.cc
        
MString.o: MString.cc
        g++ -c MString.cc

CURL.o: CURL.cc
        g++ -I../include -c CURL.cc

clean:
        -rm Window.o XMLRead.o Errors.o MString.o CURL.o Window

-----Original Message-----
From: jonatan [mailto:lists_at_unix.jonatan.com]
Sent: 24 November 2000 00:44
To: curl-library_at_lists.sourceforge.net
Subject: undefined symbols

hi.

i'm new to c, unix and curl so please bear with me...

i'm having problems getting libcurl to compile (or link?) with my
code. i'm on mac os x (client, public beta). curl installed
successfully without any problems, and the executable "curl" runs
fine. i get the following errors when i try to build my project in
projectbuilder (apple's development environment) with libcurl:

Undefined symbols:
_curl_easy_cleanup
_curl_easy_init
_curl_easy_perform
_curl_easy_setopt

i also tried just compiling the simple example (simple.c) provided in
the distribution. i don't know the correct procedure, but i guessed
that "cc simple.c" would work. same error:

cc simple.c
/usr/bin/ld: Undefined symbols:
_curl_easy_cleanup
_curl_easy_init
_curl_easy_perform
_curl_easy_setopt

am i missing something trivial? do i need to do something else to get
this to compile?

here is some output from the ./configure command:

[snip]
checking host system type... powerpc-apple-darwin1.2
checking build system type... powerpc-apple-darwin1.2
checking for ranlib... (cached) ranlib
checking for gcc... (cached) cc
checking whether the C compiler (cc ) works... yes
checking whether the C compiler (cc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for ld used by GCC... (cached) /usr/bin/ld
[snip]
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the linker (/usr/bin/ld) supports shared libraries... no
[snip]

thanks,
jonatan
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/curl-library
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/curl-library
Received on 2000-11-24