Hi, 
I compiled a C program file on Borland C++ 5.5 compiler to get one dll output 
(as instructed in the file readme.package). 
The C program file is just the example on page 31 of "writing R extensions":

void convolve(double *a, int *na, double *b, int *nb, double *ab)
{
int i, j, nab = *na + *nb - 1;
for(i = 0; i < nab; i++)
ab[i] = 0.0;
for(i = 0; i < *na; i++)
for(j = 0; j < *nb; j++)
ab[i + j] += a[i] * b[j];
}

I used
"bcc32 -Ic:\Borland\bcc55\include -Lc:\Borland\bcc55\Lib -u- -6 -O2 -WDE 
c:\Borland\bcc55\convolve.c"
to get "convolve.dll". It seemed fine.

When I used dyn.load("C:\\Borland\\BCC55\\Bin\\convolve.dll") in R (Version 
2.0.1 ), it seemed fine also, no warning or error messages. However, when I 
used is.loaded("convolve") to check if it was loaded, it showed "False".

I am working on winXP.

What could be the possible reason for that?


thanks

huanyu

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to