Nasser M. Abbasi
unread,May 22, 2013, 7:55:08 AM5/22/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
On 5/22/2013 5:39 AM, Rudra Banerjee wrote:
> Hello,
> This is possibly more a linux(or even fedora) question, then fortran.
> In my code, while compiling I get error as:
> $ gfortran -static prime.f90
> /usr/bin/ld: cannot find -lgfortran
> /usr/bin/ld: cannot find -lm
> /usr/bin/ld: cannot find -lquadmath
> /usr/bin/ld: cannot find -lm
> /usr/bin/ld: cannot find -lc
> collect2: error: ld returned 1 exit status
>
> So, I need static libraries. Any help for fedora user?
>
I copied my static build command. Try something like this
(some of these libs you might not need)
LIBS="/usr/lib/gcc/i686-linux-gnu/4.6/libgfortran.a /usr/gnat/lib/libstdc++.a"
gfortran main.f90 -static $LIBS -o main
--Nasser