Re: gfortran, lapack, and cygwin
On 2/1/2011 3:41 PM, Timothy Sliwinski wrote: [snip] $ gfortran test.for –o test –llapack And the error I receive is /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -llapack collect2: ld returned 1 exit status When I go to look for the lapack libraries, they are located in /lib/lapack and there is a file called cyglapack-0.dll along with a similarly titled BLAS DLL. Try: gfortran test.for –o test -L/lib/lapack –llapack There is probably a /usr/doc/Cygwin/lapack.README or similar (with version number or uppercase) that has some documentation. I really don't know since I don't use Fortran since school ;-) -- René Berber -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: gfortran, lapack, and cygwin
On 2/1/2011 3:41 PM, Timothy Sliwinski wrote: I am using the following command for my compilation: $ gfortran test.for –o test –llapack And the error I receive is /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -llapack collect2: ld returned 1 exit status Make sure that you install the liblapack-devel package. I think you'll need that for compiling your code, but I'm no fortran user. -Jeremy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: gfortran, lapack, and cygwin
On 2/02/2011 8:41 AM, Timothy Sliwinski wrote: Greetings all, I am having a particularly hard time getting lapack, gfortran and cygwin to play nice. I installed the lapack packages under the math section of setup.exe, however, when I go to use them with gfortran, I get errors saying gfortran can’t find the libraries. I am using the following command for my compilation: $ gfortran test.for –o test –llapack And the error I receive is /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -llapack collect2: ld returned 1 exit status You need to install the development library liblapack-devel. This provides /usr/lib/liblapack.dll.a and /usr/lib/libblas.dll.a, which are required to link applications that use the dynamic libraries cyglapack.dll and cygblas.dll. It also provides /usr/lib/liblapack.a and /usr/lib/libblas.a, which are used if you link statically. You need to link the BLAS routines by adding -lblas AFTER –llapack gfortran mytest.f90 -o mytest -llapack -lblas David PS: Bad practice to name a binary test on cygwin or any unix system, as there is a utility and also a bash builtin function with this name. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
RE: gfortran, lapack, and cygwin [SOLVED]
Thanks everyone for replying. The liblapack-devel was definitely key and worked perfectly! Yay lapack! -Tim P.S. I will remember that naming tidbit in the future, David. I forgot that tool existed. -Original Message- From: David Billinghurst [mailto:dbcyg...@gmail.com] Sent: Tuesday, February 01, 2011 6:16 PM To: Subject: Re: gfortran, lapack, and cygwin On 2/02/2011 8:41 AM, Timothy Sliwinski wrote: Greetings all, I am having a particularly hard time getting lapack, gfortran and cygwin to play nice. I installed the lapack packages under the math section of setup.exe, however, when I go to use them with gfortran, I get errors saying gfortran can't find the libraries. I am using the following command for my compilation: $ gfortran test.for -o test -llapack And the error I receive is /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -llapack collect2: ld returned 1 exit status You need to install the development library liblapack-devel. This provides /usr/lib/liblapack.dll.a and /usr/lib/libblas.dll.a, which are required to link applications that use the dynamic libraries cyglapack.dll and cygblas.dll. It also provides /usr/lib/liblapack.a and /usr/lib/libblas.a, which are used if you link statically. You need to link the BLAS routines by adding -lblas AFTER -llapack gfortran mytest.f90 -o mytest -llapack -lblas David PS: Bad practice to name a binary test on cygwin or any unix system, as there is a utility and also a bash builtin function with this name. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple