[Rd] Compiling Tcl extension C Code for an R package

From: Adrian Waddell <adrian_at_waddell.ch>
Date: Mon, 08 Nov 2010 10:41:13 -0500

Dear R Community,

I'm working on an R package that needs resizing of images. I try to keep dependencies of Tcl packages as little as possible, so I implemented the Image Scaling procedure in C as a Tcl extension found here http://wiki.tcl.tk/25685 .

Here a temporary download link of the slightly modified source


The file works with the Tcl version 8.5. I've added the gcc compile commands I use for Linux, OSX and Windows (minGW) at the beginning of the file.

I'm struggling to dynamically load the extension under Windows 7. That is i tried to use

load imgscale.dll

where under Linux and OSX I use

load ./imgscale[info sharedlibextension]

Now my Questions: does anybody know how to deal with this C extension such that when I distribute the R-package over CRAN it will work on every OS? This includes the question why I can not load the extension in Windows. Is there an R package out there which uses a C extension for a Tcl function from which I could learn how to do this?



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 08 Nov 2010 - 15:44:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 08 Nov 2010 - 20:50:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive