curl-library
Re: Cannot find -lcurl
Date: Mon, 28 Nov 2016 09:59:15 -0800
On 11/28/2016 9:01 AM, Roger Taylor wrote:
> I have successfully compiled and run a small application on SUSE 9.
> This successfully find the curl library:
> uschizlifa4304:/usr/lib> ll *libcurl*
> -rwxr-xr-x 1 root root 823 2007-07-09 09:28 libcurl.la
> lrwxrwxrwx 1 root root 16 2008-06-12 09:03 libcurl.so.2 -> libcurl.so.2.0.2
> -rwxr-xr-x 1 root root 192100 2007-07-09 09:28 libcurl.so.2.0.2
>
> uschizlifa4304:/usr/lib> rpm -qa | grep curl
> curl-7.11.0-39.15
>
>
> I am now trying to compile it on SUSE 11.
>
> Compile command is:
>> cc -m32 -O2 -I$CSW_HOME/cinc -DOS_UNX -D_CCODE -DDB_ORACLE -DOS_SUN -DOS_SUSE11 -o $1.EXE $filename `
> cat $CSW_HOME/jobs/proc32.cmp` -lcurl -lcsigen -lcsigen2 -lcsidbo -lcsiunx -lcsiingr -lingeurol -lingpri
> nt -lsockunx -limo2000 -lingfrght -lingfedx -lingesms
>
> Which gives:
> Compiling and Linking EUROLTST.c SUSE 11. . .
> /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lcurl
> collect2: ld returned 1 exit status
> Error in compiling and linking file EUROLTST.c
>
> Curl is installed on the system:
> uschizlifa4004:/app/csw/jobs> rpm -qa | grep curl
> curl-7.19.7-1.51.1
> libcurl4-7.19.7-1.51.1
>
> And libcurl.so exists
> uschizlifa4004:/app/csw/jobs> ll /usr/lib64/*libcurl*
> lrwxrwxrwx 1 root root 16 May 11 2016 /usr/lib64/libcurl.so.4 -> libcurl.so.4.1.1
> -rwxr-xr-x 1 root root 467504 Mar 23 2016 /usr/lib64/libcurl.so.4.1.1
>
> I tried creating a link from the application object directory
> uschizlifa4004:/app/csw/object> ll *libcurl*
> lrwxrwxrwx 1 cswadm cswadm 27 Nov 28 08:34 libcurl.so -> /usr/lib64/libcurl.so.4.1.1
>
> But this gives the error:
> /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /app/csw/object/libcurl.so when searching for -lcurl
>
"-m32" says "compile for 32 bits" but the libraries you are trying to
use are 64 bits ("/lib64", "x86_64"). You probably do not have the
32-bit libraries installed on the newer machine. If you install a
64-bit OS on your machine, you typically get only 64-bit libraries by
default and have to request 32-bit libraries explicitly. I don't use
SUSE on any of my machines so I can't tell you the package names to look
for, but they will typically be a variant of the 64-bit package names.
-- David Chapman dcchapman_at_acm.org Chapman Consulting -- San Jose, CA Software Development Done Right. www.chapman-consulting-sj.com ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-11-28