[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fortran, Lapack



On Tue, Dec 07, 1999 at 11:42:55AM +0100, Igor Mozetic wrote:
> 
> How does one compile a Fortran program with Lapack library ???
> I tried:
> 
> # g77 File.for

missing library

> # g77 -lliblapack File.for

wrong switch

> # g77 -L/usr/lib -lliblapack File.for

wrong switch plus superfluous option

With the -l option, you should leave out the `lib' part of the name, and
the extension:

$ g77 File.for -llapack

maybe you also need the math library (don't know if g77 does that
automatically), and if you want your code to be optimized, you'd add an
optimization switch:

$ g77 -O2 File.for -llapack -lm

Looking at your prompt `#', it seems as though you are working as root.
This is not a good idea.  Normally you only become root if you have to
for some reason, and do the rest as an `ordinary' user.

HTH,
Eric

-- 
 E.L. Meijer (tgakem@chem.tue.nl)
 Eindhoven Univ. of Technology
 Lab. for Catalysis and Inorg. Chem. (SKA)


Reply to: