Re: [Rd] Building package under windows which links against a cygwin library

From: Cameron Bracken <Cameron.Bracken_at_colorado.edu>
Date: Wed, 11 Nov 2009 16:49:10 -0700

On Wed, Nov 11, 2009 at 4:36 PM, Duncan Murdoch <murdoch_at_stats.uwo.ca> wrote:
>
> On 11/11/2009 4:41 PM, Cameron Bracken wrote:
>>
>> I am developing a package
>> (http://r-forge.r-project.org/projects/swfdevice/) which links against
>> the ming C library. The package builds fine under Mac OS X and Linux.
>> I am really out of my element on windows, but I know there is a cygwin
>> package for libming.
>>
>> My question is, does anyone have advice/examples on linking R packages
>> against cygwin libraries?  Is this even possible?  How would I go
>> about writing a configure.win script to do this?
>
> I suspect it's not going to work.  Linking to any Cygwin library will pull in the rest, and I would guess that will conflict with something else in R, which does not use Cygwin.
>

I figured that would be the case.

>
> What you could do is include a copy of the source to the ming library, and get the regular R compilers to compile it.  I just tried, and it compiled without errors (though there were a few warnings).  Then you can write your R interface to it, and everything may just work.

Hey, that is great! I thought about doing this but decided arbitrarily that it would be too hard. Do I just plop a copy of the ming source in the src/ directory of my package (then adjust Makevars accordingly)? Did you run the whole ming configure script as well?

-Cameron



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 12 Nov 2009 - 00:21:57 GMT

This archive was generated by hypermail 2.2.0 : Thu 12 Nov 2009 - 01:30:23 GMT