Sponsored Content
Top Forums Programming how to link without using ld -rpath Post 302404528 by xyzt on Wednesday 17th of March 2010 09:10:15 AM
Old 03-17-2010
how to link without using ld -rpath

Hello,
I'm tryign to compile a sample code which uses OTL(Oracle, Odbc and DB2-CLI Template Library Programmer's Guide). I get this error while compiling the source file:
Code:
[hd@mahzen otl]$ g++ foo.cpp -o foo -I /tmp/  -I$ORACLE_HOME/rdbms/demo -I$ORACLE_HOME/rdbms/public -L$ORACLE_HOME/lib/ -lclntsh
/usr/bin/ld: warning: libnnz10.so, needed by /usr/lib/oracle/xe/app/oracle/product/10.2.0/server//lib//libclntsh.so, not found (try using -rpath or -rpath-link)

libnnz10.so exists in the -L path but it complains about it.
I can't understand how to use -rpath or -path-link. I do not link the files with ld, so how can I use these options? In man page of g++ there is not an option named 'rpath'. Is it possible to pass an option to g++ to do the same thing?

Thanks.

---------- Post updated 03-17-10 at 08:10 AM ---------- Previous update was 03-16-10 at 05:28 PM ----------

Hello,
I've solved the problem.
Adding -lnnz10 is needed to link correctly.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Difference between hard link and soft link in unix

Hi All, Can any one please explain me what is the difference between hard link and soft link in UNIX. Thanks in advance Raja Chokalingam. (2 Replies)
Discussion started by: RAJACHOKALINGAM
2 Replies

2. UNIX for Dummies Questions & Answers

need some info about symbolic link and hard link

hello folks how y'all doin well i have some questions about symbolic link and hard link hope some one answer me i open terminal and join as root and i wrote ln -s blah blah then i wrote ls i see red file called blah blah but didn't understand what is this can some one explain and... (2 Replies)
Discussion started by: detective linux
2 Replies

3. Solaris

difference between RPATH and normal linking while building

while building in solaris and going for dynamic linking whats the difference or advantage or disadvantage in using RPATH vs while linking package and dependency libraries i need a little explanation about this RPATH option specially and the difference with normal linking using -L (0 Replies)
Discussion started by: mobydick
0 Replies

4. Programming

g++ fails to link to static library when compilation and link in single command

Hello All, I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it: I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies

5. UNIX for Dummies Questions & Answers

[Solved] Symbolic link not allowed or link target not accessible

Hi everybody, I read about treads realted to this issue but they did not resovle issue given below. Please help me resolve issue given below I have html file under /srv/www/htdocs/actual_folder ls actual_folder/ test.html and following link works... (0 Replies)
Discussion started by: newbielgn
0 Replies

6. Solaris

/var/adm/messages (interface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# cat /var/adm//messages Apr 20 03:10:01 Prod-App1 syslogd: line 25: WARNING: loghost could not be resolved Apr 20 08:24:18 Prod-App1... (0 Replies)
Discussion started by: javeedkaleem
0 Replies

7. Solaris

/var/adm/messages (insterface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages Apr 22 16:43:05 Prod-App1 in.routed: interface net0 to 172.16.101.1 turned off Apr 22 16:43:33 Prod-App1 mac: NOTICE: nxge0 link up, 1000 Mbps, full duplex Apr 22 16:43:34 Prod-App1 mac: NOTICE: nxge0 link... (2 Replies)
Discussion started by: javeedkaleem
2 Replies
CHRPATH(1)						 change rpath/runpath in binaries						CHRPATH(1)

NAME
chrpath - change the rpath or runpath in binaries SYNOPSIS
chrpath [ -v | --version ] [ -d | --delete ] [ -r <path> | --replace <path> ] [ -c | --convert ] [ -l | --list ] [ -h | --help ] <program> [ <program> ... ] DESCRIPTION
chrpath changes, lists or removes the rpath or runpath setting in a binary. The rpath, or runpath if it is present, is where the runtime linker should look for the libraries needed for a program. OPTIONS
-v | --version Display program version number -d | --delete Delete current rpath or runpath setting -c | --convert Convert the rpath setting into a runpath setting -r <path> | --replace <path> Replace current rpath or runpath setting with the path given -k | --keepgoing Do not fail on first error, but process all arguments before returning the error. -l | --list List the current rpath or runpath (default) -h | --help Show usage information. EXIT STATUS
0 If all operations were successful >0 if one of the operations failed. A failing operation terminates the program unless -k is specified. AUTHOR
The chrpath program was written by Petter Reinholdtsen <pere@hungry.com>, based on works by Geoffrey Keating <geoffk@ozemail.com.au> and Peeter Joot <peeterj@ca.ibm.com>. This manual page was originally written by Tollef Fog Heen <tfheen@debian.org>, for the Debian GNU/Linux system (but may be used by oth- ers). chrpath May 4, 2002 CHRPATH(1)
All times are GMT -4. The time now is 03:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy