The example in the R doc
and the hints from Shusong Jin , Ingmar Visser and Reid Huntsinger
(thanks all three) refer to the case where the function does not have
arguments.
I'm still looking for a proper sequence of commands
to call C functions with arguemnts from R.
Imagine I want to
I would like to call C routines from Fortran as suggested in section 5.6 of
the Writing R extensions documentation.
I'm familiar with Fortran but not with C.
I understand the example provided in Fortran:
subroutine testit()
double precision normrnd, x
call rndstart()
x = normrnd()
call dblepr(X
After checking paths, it works better.
But I still have trouble, see line -5 below :
C:\Documents and Settings\guillot\Mes documents\packageR CMD build geneland
* checking for file 'geneland/DESCRIPTION' ... OK
* preparing 'geneland':
* cleaning src
* removing junk files
* building
] Error 2
*** Installation of geneland failed ***
Removing 'C:/DOCUME~1/guillot/MESDOC~1/package/GENELA~1.RCH/geneland'
ERROR
Installation failed.
What is wrong here ?
Gilles
--
_
Gilles GUILLOT
INRA -Département Mathématiques
?
Gilles
_
Gilles GUILLOT
INRA -Département Mathématiques et Informatique Appliquées
Unité de Mixte de Recherche INRA - INAPG - ENGREF
Institut National Agronomique de Paris-Grignon
16 rue Claude Bernard
75231 Paris cedex 5
Aile
under mandrake linux 10.
The problem reported occurs on a new server operating under
another linux distrib (debian).
Thanks in advance for any help,
Gilles
--
_
Gilles GUILLOT
INRA -Département Mathématiques et Informatique
It works with R CMD SHLIB test.f
Thanks.
Gilles
Try
R CMD SHLIB test.f
If SHLIB know it has to deal with Fortran code, it adds the appropriate
libraries.
On Wed, 26 May 2004, Gilles GUILLOT wrote:
I have the following Fortran code
subroutine sub(path)
character*100 path
open