[R] Loading a dynamic library

From: Astle, William J <william.astle_at_imperial.ac.uk>
Date: Fri 20 May 2005 - 03:52:49 EST


Hi,

I'm trying to load a .dll library into R 2.1.0 on Windows using the "dyn.load" function. The library is compiled with gcc 3.3.3 on cygwin 1.5.16.

I compile and link:

$ gcc -c myfile.cpp -o myfile.o [HRT]
$ gcc -shared myfile.o -o myfile.dll [HRT]

I then type, in the R console,

> dynload("myfile.dll")[HRT]

And R hangs.

Any help appreciated.

Thanks.

Will


William Astle.
PhD Student,
Department of Epidemiology and Public Health, Imperial College London,
St Mary's Hospital Campus,
Norfolk Place,
Paddington.
W2 1NY.

wja [at] ic [dot] ac [dot] uk



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri May 20 04:08:18 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:55 EST