[Rd] odesolve dynload example

Thomas Petzoldt Thomas.Petzoldt at tu-dresden.de
Tue Sep 16 19:08:02 CEST 2008


Hi Matthew,

thank you for the bug report, Woodrow Setzer just uploaded a minor 
bugfix and I assume he informed you off-list.

One additional note for the records:

We suggest odesolve users should switch over to the new deSolve package. 
It is maintained by the the same (and two additional) authors like 
odesolve. It is almost ;-) fully compatible to odesolve and will replace 
it completely. The authors renamed it to deSolve, because it's able to 
solve also DAE and PDE systems, not only ODEs, so the name odesolve was 
too narrow and is now deprecated.

Note that deSolve has a package vignette about writing models in 
compiled code.

Thomas Petzoldt



Redding, Matthew wrote:
> Hello R Developers,
> 
> This is my first foray into using c-code with R, so please forgive my
> foolishness.
> I had a look at the archives and did not find anything on this, so
> hopefully I am not doubling up.
> 
> I have tried to use R cmd to create an object file from the odesolve
> dynload example.
> I am using windows and have just installed rtools, and have the latest
> version of stable R (2..7.2).
> 
> This is what happened:
> 
> C:\Program Files\R\R-2.7.2\library\odesolve\dynload\c>Rcmd SHLIB mymod.c
> making mymod.d from mymod.c
> windres --preprocessor="gcc -E -xc -DRC_INVOKED" -I
> C:/PROGRA~1/R/R-27~1.2/include  -i mymod_res.rc -o mymod_res.o
> gcc  -std=gnu99  -shared -s  -o mymod.dll mymod.def mymod.o mymod_res.o
> -LC:/PROGRA~1/R/R-27~1.2/bin    -lR
> Cannot export myderivs: symbol not found
> Cannot export myjac: symbol not found
> Cannot export mymod: symbol not found
> mymod.o: In function `mymod':
> /home/setzer/tasks/Programming_Projects/odesolve/odesolve/inst/dynload/c
> /mymod.c:14: undefined reference to `GLOBAL_OFFSET_TA
> BLE_'
> mymod.o: In function `myderivs':
> /home/setzer/tasks/Programming_Projects/odesolve/odesolve/inst/dynload/c
> /mymod.c:21: undefined reference to `GLOBAL_OFFSET_TA
> BLE_'
> mymod.o: In function `myjac':
> /home/setzer/tasks/Programming_Projects/odesolve/odesolve/inst/dynload/c
> /mymod.c:30: undefined reference to `GLOBAL_OFFSET_TA
> BLE_'
> collect2: ld returned 1 exit status
> make: *** [mymod.dll] Error 1
> 
> Any ideas what I have not got set up properly? What do I need to do to
> get this firing? 
> Advice appreciated.
> 
> Kind regards, 
> 
> Matt Redding
> ********************************DISCLAIMER**************...{{dropped:15}}
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 


-- 
Thomas Petzoldt
Technische Universitaet Dresden
Institut fuer Hydrobiologie        thomas.petzoldt at tu-dresden.de
01062 Dresden                      http://tu-dresden.de/hydrobiologie/
GERMANY



More information about the R-devel mailing list