Trouble creating statically linked executable
ken72cc
ken72cc-a@yahoo.com
Sat Feb 1 22:54:00 GMT 2014
Thanks. I think I'm beginning to understand. Using the -v option, it
appears a total of 5 libraries are needed to create the executable, and I
have .a versions of all but libm:
> [guest@T61]$ gfortran -v -o dgels3 TestDGELS_2.f -static -llapack
> -lf77blas
> Driving: gfortran -v -o dgels3 TestDGELS_2.f -static -llapack -lf77blas
> -lgfortranbegin -lgfortran -lm
>
> [guest@T61]$ locate liblapack.a libf77blas.a libgfortranbegin.a
> libgfortran.a libm.a libm.so
> /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgfortran.a
> /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgfortranbegin.a
> /usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libgfortran.a
> /usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libgfortranbegin.a
> /usr/lib64/atlas/libf77blas.a
> /usr/lib64/atlas/liblapack.a
> /usr/lib64/atlas-sse3/libf77blas.a
> /usr/lib64/atlas-sse3/liblapack.a
> /lib64/libm.so.6
> /usr/lib64/libm.so
That explains the 2nd one, but what about the first? How does one specify
the library path when -static is used? It seems -Wl-R works for shared
libraries but not for static? Does that make any sense?
Ken
--
View this message in context: http://gcc.1065356.n5.nabble.com/Trouble-creating-statically-linked-executable-tp1007779p1007793.html
Sent from the gcc - fortran mailing list archive at Nabble.com.
More information about the Fortran
mailing list