On Sat, 1 Feb 2014, ken72cc wrote:
I'm trying to create a standalone executable that will run on a system w/o
fortran installed. Spent the entire morning and cannot figure out how to do
it. If I try the following, I get an error message that the lapack library
can't be found even though the static libraries exist in the specified
directory. Does -Wl-R somehow not work for static libraries? It know it
works for shared libraries.
You should read: man ld
-R (aka -rpath) is to find shared libraries at runtime. To find libraries
(any kind) at compile-time, you want -L. Your distribution should provide
either a symlink in a standard location or a common way (pkg-config,
cmake, whatever) to discover this hidden location automatically.
--
Marc Glisse