curl-library
Error with Static Linking
Date: Fri, 18 May 2007 19:44:38 +0000
Hej.
I compiled curl 7.16.2 --without-ssl. When I try to compile my application I
se this error:
[paszczak000_at_paszczak sysinfo]$ make sysinfo-static
g++ main.o uptime.o meminfo.o cpuinfo.o qbs.o update.o kernel.o
`curl-config --libs` -static -o sysinfo-static
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(netrc.o): In
function `Curl_parsenetrc':
/usr/src/curl-7.16.2/lib/netrc.c:117: warning: Using 'getpwuid' in statically
linked applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(hostip6.o): In
function `Curl_getaddrinfo':
/usr/src/curl-7.16.2/lib/hostip6.c:291: warning: Using 'getaddrinfo' in
statically linked applications requires at runtime the shared libraries from
the glibc version used for linking
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(connect.o): In
function `tcpnodelay':
/usr/src/curl-7.16.2/lib/connect.c:621: warning: Using 'getprotobyname' in
statically linked applications requires at runtime the shared libraries from
the glibc version used for linking
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(url.o): In
function `fix_hostname':
/usr/src/curl-7.16.2/lib/url.c:2556: undefined reference to
`stringprep_check_version'
/usr/src/curl-7.16.2/lib/url.c:2559: undefined reference to `idna_to_ascii_lz'
/usr/src/curl-7.16.2/lib/url.c:2560: undefined reference to
`stringprep_locale_charset'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(url.o): In
function `tld_check_name':
/usr/src/curl-7.16.2/lib/url.c:2515: undefined reference to
`idna_to_unicode_lzlz'
/usr/src/curl-7.16.2/lib/url.c:2519: undefined reference to `tld_check_lz'
/usr/src/curl-7.16.2/lib/url.c:2534: undefined reference to `idn_free'
/usr/src/curl-7.16.2/lib/url.c:2523: undefined reference to `tld_strerror'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(url.o): In
function `Curl_disconnect':
/usr/src/curl-7.16.2/lib/url.c:1875: undefined reference to `idn_free'
/usr/src/curl-7.16.2/lib/url.c:1879: undefined reference to `idn_free'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(ldap.o): In
function `DynaGetFunction':
/usr/src/curl-7.16.2/lib/ldap.c:201: undefined reference to `dlsym'
/usr/src/curl-7.16.2/lib/ldap.c:205: undefined reference to `dlsym'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(ldap.o): In
function `DynaClose':
/usr/src/curl-7.16.2/lib/ldap.c:174: undefined reference to `dlclose'
/usr/src/curl-7.16.2/lib/ldap.c:179: undefined reference to `dlclose'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(ldap.o): In
function `DynaOpen':
/usr/src/curl-7.16.2/lib/ldap.c:146: undefined reference to `dlopen'
/usr/src/curl-7.16.2/lib/ldap.c:154: undefined reference to `dlopen'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(content_encoding.o):
In function `exit_zlib':
/usr/src/curl-7.16.2/lib/content_encoding.c:73: undefined reference to
`inflateEnd'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(content_encoding.o):
In function `inflate_stream':
/usr/src/curl-7.16.2/lib/content_encoding.c:104: undefined reference to
`inflate'
/usr/src/curl-7.16.2/lib/content_encoding.c:136: undefined reference to
`inflateReset'
/usr/src/curl-7.16.2/lib/content_encoding.c:137: undefined reference to
`inflateInit2_'
/usr/src/curl-7.16.2/lib/content_encoding.c:120: undefined reference to
`inflateEnd'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(content_encoding.o):
In function `Curl_unencode_gzip_write':
/usr/src/curl-7.16.2/lib/content_encoding.c:281: undefined reference to
`zlibVersion'
/usr/src/curl-7.16.2/lib/content_encoding.c:283: undefined reference to
`inflateInit2_'
/usr/src/curl-7.16.2/lib/content_encoding.c:290: undefined reference to
`inflateInit2_'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(content_encoding.o):
In function `Curl_unencode_deflate_write':
/usr/src/curl-7.16.2/lib/content_encoding.c:167: undefined reference to
`inflateInit_'
/usr/lib/gcc/i586-mandriva-linux-gnu/4.1.1/../../../libcurl.a(strerror.o): In
function `Curl_idn_strerror':
/usr/src/curl-7.16.2/lib/strerror.c:682: undefined reference to
`idna_strerror'
collect2: ld returned 1 exit status
make: *** [sysinfo-static] Błąd 1
curl-config --libs return only -lcurl
I have g++ (GCC) 4.1.1 20060724 (prerelease) (4.1.1-3mdk)
What is wrong? I complie this application at FreeBSD 6.2 and everything is
okey.
Received on 2007-05-18