libgfortran linking problem

Tim Holme timholme@gmail.com
Fri Jun 26 23:00:00 GMT 2009


Thanks for the reply.   When I try that, the executable throws the error:

>./foo
./foo: error while loading shared libraries: libgfortran.so.0: cannot
open shared object file: No such file or directory

Additionally, when building my program, which requires lapack, I get
the warning message:
/usr/bin/ld: warning: libgfortran.so.3, needed by
/usr/lib//liblapack.so, may conflict with libgfortran.so.0


Thanks again for your help,
T

On Fri, Jun 26, 2009 at 3:03 PM, Steve
Kargl<sgk@troutmask.apl.washington.edu> wrote:
> On Fri, Jun 26, 2009 at 02:50:22PM -0700, Tim Holme wrote:
>> when compiling a fortran program with gfortran and linking with
>> -lgfortran, I'm having undefined references to gfortran programs.
>>
>>gfortran -o foo [lots of .o files]  -L/usr/pubsw/lib/ -llapack \
>>   -L/usr/pubsw/lib/ -lblas -L/usr/lib/gcc/x86_64-linux-gnu/4.3 \
>>   -lgfortran -lgfortranbegin
>>
>
> (snip)
>
>> Any ideas?  Thanks very much,
>
> Try removing "-L/usr/lib/gcc/x86_64-linux-gnu/4.3
> -lgfortran -lgfortranbegin" from your command line.
>
>
> --
> Steve
>



More information about the Fortran mailing list