From nicola.lunardon at hotmail.it  Thu Mar 26 09:20:16 2015
From: nicola.lunardon at hotmail.it (bstr)
Date: Thu, 26 Mar 2015 01:20:16 -0700 (PDT)
Subject: [Rd] F77_CALL/NAME problem
In-Reply-To: <1427276694207-4705076.post@n4.nabble.com>
References: <1427276694207-4705076.post@n4.nabble.com>
Message-ID: <1427358016722-4705128.post@n4.nabble.com>

Thank you John and William for the replies!

@John: I downloaded the Fortran files from 
http://www.netlib.org/lapack/double/ <http://www.netlib.org/lapack/double/>  
(the link "dgesv.f plus dependencies"). In file dgesv.f the subroutine is
declared as 

SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) 

with capital letters.

@William: after looking for a while for a solution I discovered that R had
"embedded" all the things I needed, so I just got rid of F77_NAME/CALL in my
C code and simply called dgesv_ as declared in Lapack.h (adding as you
suggested #include <R_ext/Lapack.h> in the preamble). So I did not changed
the previous declarations of DGESV in my C file to lower case.

On the one hand, it seemed (and seems) to me quite odd that my old code did
not work and I would like to know why, even if it not a priority anymore. On
the other hand, I am happy to have found a new, and, I suppose, more
"R-package" oriented way, to use Fortran's linear algebra routines in my C
code. 

N. Lunardon



--
View this message in context: http://r.789695.n4.nabble.com/F77-CALL-NAME-problem-tp4705076p4705128.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] F77_CALL/NAME problem
bstr