Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 2010 16:57:50 +0300 (MSK)
From:      "Igor V. Ruzanov" <igorr@canmos.ru>
To:        Anton Shterenlikht <mexas@bristol.ac.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: linking against shared libraries not in default path
Message-ID:  <Pine.LNX.4.64.1011291657200.31136@sta1.canmos.ru>
In-Reply-To: <20101129135058.GA6756@mech-cluster241.men.bris.ac.uk>
References:  <20101129135058.GA6756@mech-cluster241.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 29 Nov 2010, Anton Shterenlikht wrote:

|I compiled some numerical libraries under my home
|directory, including static and shared libs. The
|shared lib is
|
|% ls ./src/libslatec.so.1
|./src/libslatec.so.1
|%
|
|Now I'd like to test shared libraries, so I do 
|
|% gfortran45 -o test01.x test01.o qc6a.o -L./src/ -lslatec
|% ./test01.x 
|/libexec/ld-elf.so.1: Shared object "libslatec.so.1" not found, required by "test01.x"
|%
|
|How can I tell the executable to look for a shared library
|in a specific directory? I tried setting LIBRARY_PATH, but
|it didn't help.
|
|Perhaps I completely misunderstand how shared libraries work..
|
|Please advise
|
ldconfig -m ./src/libslatec.so.1 (in your example)

+-------------------------------------------+
! CANMOS ISP Network                        !
+-------------------------------------------+
! Best regards                              !
! Igor V. Ruzanov, network operational staff!
! e-Mail: igorr@canmos.ru                   !
+-------------------------------------------+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.64.1011291657200.31136>