delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/02/01/19:51:35

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
From: "Timothy Sliwinski" <zensunnioracle AT gmail DOT com>
To: <cygwin AT cygwin DOT com>
References: <C8FD652314C840A4B74BF3847CE030DB AT MASTERSHAKE> <4D489420 DOT 2070304 AT gmail DOT com>
Subject: RE: gfortran, lapack, and cygwin [SOLVED]
Date: Tue, 1 Feb 2011 19:51:12 -0500
Message-ID: <C7C4FD98B18E4C8C84BD0E42F9DBC87E@MASTERSHAKE>
MIME-Version: 1.0
In-Reply-To: <4D489420.2070304@gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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:dbcygwin AT gmail DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019