Re: [R] dll problem with C++ function

2010-11-03 Thread Peter Langfelder
Just a shot in the dark... Do you properly close the input/output files at the end of your function? If not and the file remains open, it may throw an error upon new attempt to read it. It is possible that dyn.unload, among other things, closes all open connections and hence upon re-load everything

[R] dll problem with C++ function

2010-11-03 Thread Carsten Dormann
Dear fellow R-users, I have the problem of being unable to repeatedly use a C++-function within R unless by dyn.unloading/dyn.loading it after each .C call. The C++-code (too large to attach) compiles without problem using R CMD SHLIB. It loads (using dyn.load("myfun.so")) and executes (via .

Re: [R] dll problem

2008-07-14 Thread Prof Brian Ripley
This question has already been answered on R-devel. In any case, the correct procedure is discussed in the 'R Installation and Administration Manual', and does not involve 'cygwin'. On Mon, 14 Jul 2008, stephenb wrote: I am trying to load a dll compiled with the latest cygwin into R 2.7.0 R

[R] dll problem

2008-07-14 Thread stephenb
I am trying to load a dll compiled with the latest cygwin into R 2.7.0 R version 2.7.0 (2008-04-22) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 I have: Sys.getenv("Path")