* specifying paths to shared objects
@ 1994-07-26 18:54 Sajee
1994-07-28 14:04 ` Frank Wortner
0 siblings, 1 reply; 2+ messages in thread
From: Sajee @ 1994-07-26 18:54 UTC (permalink / raw)
Hello,
I want to know how I can tell ld the path to a shared object when it is creating an executable. I dont want to use LD_LIBRARY_PATH. I need a method whereby I can specify the paths to certain shared objects at link time. These shared objs will not found in the default directories.
I've tried -rpath but it doesn't seem to work. From what the man page says it seems like you are to specify directory(s) as arguments to rpath but when i do that i get this error:
Object file format error in:/home/scm/lib: bad file magic number
If I specify the full path to the shared object in -rpath I get no errors but the loader cannot find the shared object.
Please send all responses to scm@chesapeake.com
thanks,
Sajee
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: specifying paths to shared objects
1994-07-26 18:54 specifying paths to shared objects Sajee
@ 1994-07-28 14:04 ` Frank Wortner
0 siblings, 0 replies; 2+ messages in thread
From: Frank Wortner @ 1994-07-28 14:04 UTC (permalink / raw)
In article <313m4s$aot@remus.rutgers.edu>, mathew@remus.rutgers.edu (Sajee) writes:
|>Hello,
|>
|>I want to know how I can tell ld the path to a shared object when it is creating an executable. I dont want to use LD_LIBRARY_PATH. I need a method whereby I can specify the paths to certain shared objects at link time. These shared objs will not found in the default directories.
|>
|>I've tried -rpath but it doesn't seem to work.
You could try setting the SONAME when you build the shared object. Normally,
this is set to the last (filename) component of the object. For example
the SONAME of /some/where/libfoo.so is "libfoo.so". You can hardcode a
path to a library by setting the SONAME to the full pathname of the library.
ld -shared -soname /some/where/libfoo.so -o libfoo.so *.o ...
See the loader(5) man page for details.
Frank
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1994-07-28 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-07-26 18:54 specifying paths to shared objects Sajee
1994-07-28 14:04 ` Frank Wortner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox