- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ld: Can't find library for -lclntsh
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2015 10:33 AM
07-30-2015 10:33 AM
ld: Can't find library for -lclntsh
11.31. Using standard cc compiler.
how do I correctly link the library? It is apparently not on the system, where do I install it from?
When I try to compile some C code, I get this, any idea what it means? I am on 11.31. Using native CC compiler.
cc -o /var/tmp/mup mupp.o -L/lib/hpux64 -L/lib/ -lclntsh `cat /lib/ldflags` `cat /lib/sysliblist` -lelf -lm -lrt
ld: Can't find library for -lclntsh
Fatal error.
*** Error exit code 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2015 07:39 PM
07-30-2015 07:39 PM
Re: ld: Can't find library for -lclntsh
> how do I correctly link the library? It is apparently not on the
> system, where do I install it from?
With my weak psychic powers, I don't really know. Have you tried
asking the people who supplied your (invisible) "some C code"? Who told
you to specify "-lclntsh"? I know nothing, but a Web search for
"libclntsh" suggested to me that Oracle might be involved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2015 10:17 PM
07-30-2015 10:17 PM
Re: ld: Can't find library for -lclntsh
>cc ... -L/lib/hpux64 -L/lib/ -lclntsh `cat /lib/ldflags` `cat /lib/sysliblist` -lelf -lm -lrt
Is this a 64 bit Integrity app?
These paths don't really exist: -L/lib/hpux64 -L/lib/
Remove them and take the defaults.
Also, what does this show? cat /lib/sysliblist
Ask Steven asked, where to you have your Oracle shlibs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2015 10:01 AM
07-31-2015 10:01 AM
Re: ld: Can't find library for -lclntsh
# ll -d /lib/hpux64 #07/31/15 1:02PM#
dr-xr-xr-x 10 bin bin 8192 Feb 16 2011 /lib/hpux64
# cat /lib/sysliblist #07/31/15 1:02PM#
-lrt -ldl -lm -lpthread -lnsl -lunwind -ldiskown
siddev2w:/comp/source#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2015 02:31 PM
07-31-2015 02:31 PM
Re: ld: Can't find library for -lclntsh
># ll -d /lib/hpux64
The correct path for 64 bit is /usr/lib/hpux64. But as I said, leave the defaults off.
># cat /lib/sysliblist
There is nothing here (-L) that points to the Oracle lib directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2015 01:10 PM
08-10-2015 01:10 PM
Re: ld: Can't find library for -lclntsh
Now I get this, when I run the make command.
I have ncurses 5.9 installed on the system, how do I make sure the compiler recognizes them? Seems the compiler is not finding the ncurses libraries.
I updated these varables to reflect the correct path:
echo $SHLIB_PATH
/oracle/app/product/fmw11g/forms/lib:/usr/local/lib/hpux32/:/usr/local/lib/hpux32/:/usr/lib/hpux64
# make -f /comp/bin/proc.mk build INAME=pum109p.pc EXE=/var/tmp/pum109p_temp2 OBJS=pum109p.o
cc -o /var/tmp/pum109p_temp2 pum109p.o -L/lib/hpux64 -L/oracle/app/product/fmw11g/forms/lib/ -lclntsh `cat /oracle/app/product/fmw
11g/forms/lib/ldflags` `cat /oracle/app/product/fmw11g/forms/lib/sysliblist` -lelf -lm -lrt
ld: Unsatisfied symbol "mvwprintw" in file pum109p.o
ld: Unsatisfied symbol "initscr" in file pum109p.o
ld: Unsatisfied symbol "endwin" in file pum109p.o
ld: Unsatisfied symbol "wgetstr" in file pum109p.o
ld: Unsatisfied symbol "wnoutrefresh" in file pum109p.o
ld: Unsatisfied symbol "mvprintw" in file pum109p.o
ld: Unsatisfied symbol "wrefresh" in file pum109p.o
ld: Unsatisfied symbol "noecho" in file pum109p.o
ld: Unsatisfied symbol "wmove" in file pum109p.o
ld: Unsatisfied symbol "echo" in file pum109p.o
ld: Unsatisfied symbol "stdscr" in file pum109p.o
ld: Unsatisfied symbol "mvaddstr" in file pum109p.o
ld: Unsatisfied symbol "waddch" in file pum109p.o
13 errors.
*** Error exit code 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2015 12:19 AM
08-11-2015 12:19 AM
Re: ld: Can't find library for -lclntsh
>how do I make sure the compiler recognizes them?
You need to pass -L and -l to the driver to pick up these shlibs.
For aC++ you can look at:
http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/HTML/libs.htm
>I updated these varables to reflect the correct path: echo $SHLIB_PATH
SHLIB_PATH is NOT used during linking, only during execution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2015 06:41 AM
08-11-2015 06:41 AM
Re: ld: Can't find library for -lclntsh
It does compile the program. But when I run it, I get this. It looks like it cannot find the curses package, which I do have installed on the system.
/usr/lib/hpux64/dld.so: Unsatisfied data symbol 'stdscr' in load module '/var/tmp/temp2'.
Killed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2015 06:49 AM
08-11-2015 06:49 AM
Re: ld: Can't find library for -lclntsh
ldd /var/tmp/temp2
/var/tmp/temp2:
libclntsh.so.11.1 => /oracle/app/product/fmw11g/forms/lib/libclntsh.so.11.1
libdl.so.1 => /lib/hpux64/libdl.so.1
libm.so.1 => /lib/hpux64/libm.so.1
libpthread.so.1 => /lib/hpux64/libpthread.so.1
libnsl.so.1 => /lib/hpux64/libnsl.so.1
libunwind.so.1 => /lib/hpux64/libunwind.so.1
libelf.so.1 => /lib/hpux64/libelf.so.1
librt.so.1 => /lib/hpux64/librt.so.1
libc.so.1 => /lib/hpux64/libc.so.1
libnnz11.so => /oracle/app/product/fmw11g/forms/lib/libnnz11.so
libdl.so.1 => /usr/lib/hpux64/libdl.so.1
libm.so.1 => /usr/lib/hpux64/libm.so.1
libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1
libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1
libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1
libc.so.1 => /usr/lib/hpux64/libc.so.1
libxti.so.1 => /usr/lib/hpux64/libxti.so.1
libuca.so.1 => /usr/lib/hpux64/libuca.so.1
libdl.so.1 => /usr/lib/hpux64/libdl.so.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2015 10:31 AM
08-11-2015 10:31 AM
Re: ld: Can't find library for -lclntsh
> You need to pass -L and -l to the driver to pick up these shlibs.
how do I do that? and what is the path for the curses library to use, which is what it's missing.