Eclipse-Photran, Cygwin and fortran90 linking problem

Post here if you have a question about linking your program with LAPACK or ScaLAPACK library

Eclipse-Photran, Cygwin and fortran90 linking problem

Postby tvandenbrande » Thu Sep 27, 2012 3:41 am

I'm trying to use the lapack library for two routines (DPBTRF and DPBTRS) in a fortran90 code that was previously compiled with a compaq compiler. We recently changed to gfortran and I can't get the lapack library in my programs. My current setup (on a windows7 machine):
  • Eclipse with Photran 8.0 package
  • Cygwin installation with the lapack libraries (including liblapack-devel)
  • Cygwin directories added to the windows PATH
In the folder C:\cygwin\lib there are the lapack files:
  • libblas.a
  • libblas.dll
  • liblapack.a
  • liblapack.dll
There is also a folder called lapack with the files cygblas-0.dll and cyglapack-0.dll
Now, the project in eclipse-photran is a GNU fortran project (with the GCC toolchain) which generates its makefiles automaticly (because the program has quite a lot of subroutines and modules this is quite handy). When builing I get the following error-message:
make all
Building file: ../Hamfem.f90
Invoking: GNU Fortran Compiler
gfortran -funderscoring -O0 -g -Wall -c -fmessage-length=0 -L"C:\cygwin\lib"-llapack -o "Hamfem.o" "../Hamfem.f90"
cygwin warning:
MS-DOS style path detected: C:\Users\thys\Documents\doctoraat\10_publications\in progress\HAMFEM-GNUfortran\Debug
Preferred POSIX equivalent is: /cygdrive/c/Users/thys/Documents/doctoraat/10_publications/in progress/HAMFEM-GNUfortran/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths: ... -pathnames

use lapack ! alternative for msimsl
Fatal Error: Can't open module file 'lapack.mod' for reading at (1): No such file or directory recipe for target `Hamfem.o' failed
make: *** [Hamfem.o] Error 1

Does someone know what I did wrong and how I can include the lapack library?
Posts: 3
Joined: Thu Sep 27, 2012 3:14 am

Re: Eclipse-Photran, Cygwin and fortran90 linking problem

Postby admin » Tue Nov 20, 2012 11:42 am

There is no lapack.mod in the LAPACK package, because there is no LAPACK module.
I would take off that use statement.
Site Admin
Posts: 600
Joined: Wed Dec 08, 2004 7:07 pm

Return to Linking Problem

Who is online

Users browsing this forum: No registered users and 1 guest