View Single Post

   
  #3 (permalink)  
Old 01-16-2008, 05:34 PM
Rémy
 
Posts: n/a
Default Re: Problem with 32 bits executable on HP11 and SHLIB_PATH


"Andrey Babayan" <andrey@numeca.be> a écrit dans le message de
news:btu52u$g8b$1@reader08.wxs.nl...
> Hello,
>
> I have a small example consisting of two files, in attachement.
>
> With the first file, I make a shared library, while with the second one
> (that contains
> the main) I compile an executable that links with the shared library.
>
> I use the following commands:
>
> aCC +z -c mylib.C
> aCC -b -o libmylib.sl
> aCC main.C -L ./ -lmylib
>
> This create a linmylib.sl file and a a.out executable which I can run
> without problem.
> However, when I move the shared library to another place, I cannot run
> a.out anymore. Exemple:
>
> mkdir tmp
> mv libmylib.sl tmp
> setenv SHLIB_PATH /raid/michel/tmp/_create_shared_library/tmp
> a.out
>
> I get the following error message:
>
> /usr/lib/dld.sl: Can't open shared library: .//libmylib.sl
> /usr/lib/dld.sl: No such file or directory
> Abort (core dumped)
>
> I can find no way to indicate a.out to use the library in the tmp
> directory.
>
> HOWEVER, when I compile everthing with +DD64, it works without any
> problem (SHLIB_PATH works)
>
> Can you advice me about this problem (only related to 32 bits
> executable)
>
>
> --
> Andrey Babayan,
> System Administrator
> NUMECA International
> Av. Franklin Roosevelt 5
> B-1050 Brussels Belgium
> Tel: +32 2 643.35.73 (direct)
> +32 2 647.83.11 (main) ext 833
> Fax: +32 2 647.93.98
> http://www.numeca.com
>
>


look at the document named "linker reference" on the HP site (if i
remember...)

You will discover that default options for the linker are quite different in
32 and 64 bits (for compatibility with pre-64 bit linker).

"man ld" should show you what is the option needed in 32 bits to activate
"SHLIB_PATH".

Regards

Rémy


Reply With Quote