cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problem with -static -lcurl

From: Kamil Porembinski <paszczak_at_thecamels.org>
Date: Fri, 26 Jan 2007 23:23:43 +0100

Hi,
When I try build my program:
g++ -static -lcurl sysinfo.o uptime.o meminfo.o cpuinfo.o qbs.o update.o -o
sysinfo

I have some error:

sysinfo.o: In function `main':
main.cpp:(.text+0x22f): undefined reference to `curl_easy_init'
main.cpp:(.text+0x241): undefined reference to `curl_easy_setopt'
main.cpp:(.text+0x13b7): undefined reference to `curl_easy_setopt'
main.cpp:(.text+0x13dd): undefined reference to `curl_easy_setopt'
main.cpp:(.text+0x13eb): undefined reference to `curl_easy_perform'
main.cpp:(.text+0x142c): undefined reference to `curl_easy_cleanup'
update.o: In function `check_version(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)':
update.cpp:(.text+0x5f): undefined reference to `curl_easy_init'
update.cpp:(.text+0x71): undefined reference to `curl_easy_setopt'
update.cpp:(.text+0x93): undefined reference to `curl_easy_setopt'
update.cpp:(.text+0xab): undefined reference to `curl_easy_setopt'
update.cpp:(.text+0xc3): undefined reference to `curl_easy_setopt'
update.cpp:(.text+0xdd): undefined reference to `curl_easy_setopt'
update.cpp:(.text+0xeb): undefined reference to `curl_easy_perform'
update.cpp:(.text+0xf9): undefined reference to `curl_easy_cleanup'
update.o: In function `update(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >)':
update.cpp:(.text+0x1e5): undefined reference to `curl_easy_init'
update.cpp:(.text+0x234): undefined reference to `curl_easy_init'
update.cpp:(.text+0x24c): undefined reference to `curl_easy_setopt'
update.cpp:(.text+0x264): undefined reference to `curl_easy_setopt'
update.cpp:(.text+0x27a): undefined reference to `curl_easy_setopt'
update.cpp:(.text+0x288): undefined reference to `curl_easy_perform'
update.cpp:(.text+0x2a2): undefined reference to `curl_easy_getinfo'
update.cpp:(.text+0x39a): undefined reference to `curl_easy_cleanup'
collect2: ld returned 1 exit status
make: *** [sysinfo] Error 1

I have in system Mandriva 2006:
/usr/include/curl/
/usr/lib/libcurl.a
/usr/lib/libcurl.so

I have RPM:
libcurl3-devel
libcurl3

Next I download curl-7.16.0, compile and install it, and I have this same
problem. What shall I do?
Received on 2007-01-26