c - Compilation error: /usr/bin/ld: cannot find -lclntsh -


while trying compile c program using make file, facing following linking error described below.

i know kind of issues discussed in many other posts, tried solutions suggested in them did not work.

/usr/bin/ld: cannot find -lclntsh

libclntsh.so , libclntsh.so.10.1 present in oracle path /u01/app/oracle/product/10.2.0/lib , being given -l option in make file. still facing issue:-

linking yieldrpt ... cc -v -g -d_hpux_source -dpareto -wl,-aarchive -l/u01/app/oracle/product/10.2.0/lib/         yieldrpt.o  -lclntsh `cat /u01/app/oracle/product/10.2.0/lib/ldflags`   -lmalloc -ldl -lm   \                 -lmalloc -o yieldrpt using built-in specs. target: i386-redhat-linux configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux thread model: posix gcc version 4.1.2 20080704 (red hat 4.1.2-54) /usr/libexec/gcc/i386-redhat-linux/4.1.2/collect2 --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -o yieldrpt /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crt1.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbegin.o -l/u01/app/oracle/product/10.2.0/lib/ -l/usr/lib/gcc/i386-redhat-linux/4.1.2 -l/usr/lib/gcc/i386-redhat-linux/4.1.2 -l/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. -aarchive yieldrpt.o -lclntsh -lnbeq10 -lnhost10 -lnus10 -lnldap10 -lldapclnt10 -lnsslb10 -lntcp10 -lntcps10 -lnsslb10 -lntcp10 -lntns10 -lmalloc -ldl -lm -lmalloc -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i386-redhat-linux/4.1.2/crtend.o     /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o /usr/bin/ld: cannot find -lclntsh collect2: ld returned 1 exit status make: *** [yieldrpt] error 1 

please let me know if other info needed. thank you

you passing -aarchive linker. hp/ux compatibility option synonymous -bstatic, directs linker not link dynamic libraries. hence libclntsh.so ignored. see the documentation

if don't know why option there may remove , try again. if know necessary have find static libraries, including libclntsh.a link against.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -