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 » Fri Sep 28, 2012 5:27 am

I installed eclipse, photran and cygwin with the gfortran compiler and lapack libraries on my Windows 7 machine. When trying to invoke the lapack library for two routines (dpbtrf and dpbtrs) I get the following error message:
Building file: ../Hamfem.f90
Invoking: GNU Fortran Compiler
gfortran -funderscoring -O3 -Wall -c -fmessage-length=0 -llapack -o "Hamfem.o" "../Hamfem.f90"
cygwin warning:
MS-DOS style path detected: C:\Users\thys\Documents\doctoraat\10_publications\in progress\HAMFEM-GNUfortran\Release
Preferred POSIX equivalent is: /cygdrive/c/Users/thys/Documents/doctoraat/10_publications/in progress/HAMFEM-GNUfortran/Release
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.h ... -pathnames
../Hamfem.f90:12.72:

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


I tried a few things already and can rule out the following:
  • I installed all lapack libraries in cygwin (including the dev library)
  • liblapack.a and libblas.a are located in the library folder C:/cygwin/lib

Does someone knows what settings in eclipse are wrong, or where I have to add or change things?
Last edited by tvandenbrande on Fri Sep 28, 2012 10:57 am, edited 1 time in total.
tvandenbrande
 
Posts: 3
Joined: Thu Sep 27, 2012 3:14 am

Re: Eclipse-Photran, Cygwin and fortran90 linking problem

Postby tvandenbrande » Fri Sep 28, 2012 10:56 am

UPDATE:
I managed to resolve a few issues, by changing the properties in Eclipse like this:
  • Fortran Project: executable GNU fortran on Windows (GCC toolchain)
  • GNU fortran compiler: gfortran ${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
  • GNU fortran linker: gfortran ${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
  • I compiled the libraries libblas.a and liblapack.a, to use as a static library, for windows and they are located in the C:/cygwin/lib folder.
  • In the GNU fortran linker properties, the libraries were called lapackand blasin the folder C:/cygwin/lib. This results in a part -L"C:/cygwin/lib" -llapack -lblas in the {$COMMAND} section of the compiler and linker.
Now the code compiles, but when running the resulting *.exe file I get the following error message:
Code: Select all
The program can't start because cyglapack-0.dll is missing from your computer. Try reinstalling the program to fix this problem.

This file does exist on my computer in the folder C:/cygwin/lib/lapack but was not included during the build. Does anyone have an idea to fix it?
tvandenbrande
 
Posts: 3
Joined: Thu Sep 27, 2012 3:14 am


Return to Linking Problem

Who is online

Users browsing this forum: No registered users and 2 guests