Trouble creating statically linked executable
ken72cc
ken72cc-a@yahoo.com
Sat Feb 1 20:21:00 GMT 2014
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 the familiar error message that the
lapack library can't be found even though the static libraries exist in the
specified directory:
> [guest@T61 DGELS_Lib]$ gfortran -o dgels3 TestDGELS_2.f -static
> -Wl,-R/usr/lib64/atlas-sse3 -llapack -lf77blas
> /usr/bin/ld: cannot find -llapack
> collect2: ld returned 1 exit status
>
> [guest@T61 DGELS_Lib]$ ls -l /usr/lib64/atlas-sse3/liblapack.a
> /usr/lib64/atlas-sse3/libf77blas.a
> -rw-r--r--. 1 root root 562242 Mar 20 2012
> /usr/lib64/atlas-sse3/libf77blas.a
> -rw-r--r--. 1 root root 9639442 Mar 20 2012
> /usr/lib64/atlas-sse3/liblapack.a
If I don't use the library path option and provide full path names to the
libraries I still get an error:
> [guest@T61 DGELS_Lib]$ gfortran -o dgels3 -static TestDGELS_2.f
> /usr/lib64/atlas-sse3/liblapack.a /usr/lib64/atlas-sse3/libf77blas.a
> /usr/bin/ld: cannot find -lm
> collect2: ld returned 1 exit status
What am I doing wrong?
Ken
--
View this message in context: http://gcc.1065356.n5.nabble.com/Trouble-creating-statically-linked-executable-tp1007779.html
Sent from the gcc - fortran mailing list archive at Nabble.com.
More information about the Fortran
mailing list