cURL / Mailing Lists / curl-library / Single Mail


compile libcurl dynamically with cross-compiler

From: Tiberiu Motoc <>
Date: Fri, 16 Nov 2007 13:37:02 -0800

Hi everybody,

I've been trying to get my program to work for a few days and no luck,
so I'm hoping someone could answer my question.

I want to know if there is a way to compile libcurl dynamically
(Static=no) using a cross compiler. I did manage to configure it and
compile it with the cross compiler, however, when I link to it in my
program, I get th following error:

multiple definition of `errno'
/home/motoct/uClinux-dist/lib/libc/crt0.o(.data+0x4): first defined here
collect2: ld returned 1 exit status
make[2]: *** [messenger] Error 1

I think this is because I compiled libcurl statically, so if when I
try to link to it in my program I get a "multiple definition" error.
So, how can I get it to compile without being static? Will that get
rid of the problem, or am I making the wrong assumption about this
error message?

I tried including "--enable-static=no" in the config line and that
didn't do anything. I then tried to change the LDLAGS and I added
"-Wl" and that made configure fail. I also played around with
"--static" and that didn't do anything either.


PS. I'm using v7.14.0
Received on 2007-11-16