On Sat, 13 Oct 2007, Bernardo Lagos Alvarez wrote:
> Hi all,
>
> here others doubts, when load and running the function
>
> void gdot(double *x,double *y,int *n,double *output){
> int i;
> *output=0;
> for (i=0;i<*n;i++){
> *output+=x[i]*y[i];
> }
> }
>
>
> as following
>
> /examplesC$ R CMD SHLIB
Let me also comment that you are trying to interface to a function ported
to C++ from the Cephes library, which is in C. You have not explained why
you are trying to interface to the function (is this an exercise, or do
you suspect a problem with digamma()?), but if you just want access to it
as i
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
The code is C++ and so is compiled
using the C++ compiler, not the C compiler.
This is because the name of the file is .cpp
(and you include iostream.h, but don't seem to make any use of it.)
As a result, the names of the routines are "mangled"
and s
Hi all,
here others doubts, when load and running the function
void gdot(double *x,double *y,int *n,double *output){
int i;
*output=0;
for (i=0;i<*n;i++){
*output+=x[i]*y[i];
}
}
as following
/examplesC$ R CMD SHLIB xby.c
gcc -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include -fpic
Dear All,
could someone please shed some light on the use of the .C or .Fortran function:
I am trying load and running on R the following function
// psi.cpp -- psi function for real arguments.
// Algorithms and coefficient values from "Computation of Special
// Functions", Zhang a
5 matches
Mail list logo