Skip to content
Back to formatted view

Raw Message

Message-ID: <h1udst4r139vr8pthtun47vvnvbsljo9qi@4ax.com>
Date: 2001-10-12T14:06:08Z
From: Duncan Murdoch
Subject: Underscores and Fortran code
In-Reply-To: <15302.1420.571215.515265@minke.stat.ufl.edu>

On Thu, 11 Oct 2001 16:48:12 -0400, you wrote in message
<15302.1420.571215.515265 at minke.stat.ufl.edu>:

>Any suggestions are welcome.  Am I missing anything?

A 5th suggestion:  you can change the R code.  In the Windows version
1.3.1, I get these results:

Just like you, an error with the real name:

 > .Fortran("dog_dog", as.double(x), as.double(y), as.double(z))
 Error in .Fortran("dog_dog", as.double(x), as.double(y),
as.double(z)) : 
         C/Fortran function name not in load table

But add an extra underscore to the call and things are fine:

 > .Fortran("dog_dog_", as.double(x), as.double(y), as.double(z))
 [[1]]
 [1] 2

 [[2]]
 [1] 3

 [[3]]
 [1] 5

It seems like a fairly easy workaround to just append an extra
underscore to names when the compiler is doing this funny name
mangling.

Duncan Murdoch
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._