[R] 32bit R303 calls external C functions

Li, Yan Yan_Li at ibi.com
Thu Feb 12 19:07:02 CET 2015


I meant R3.0.3. I need this package working in R3.0.3.

I have 32bit and 64bit dlls both included in the package.


-----Original Message-----
From: Duncan Murdoch [mailto:murdoch.duncan at gmail.com] 
Sent: Thursday, February 12, 2015 1:01 PM
To: Li, Yan; r-help at r-project.org
Subject: Re: [R] 32bit R303 calls external C functions

On 12/02/2015 11:08 AM, Li, Yan wrote:
> Dear All,
>
> I build a R package which will need to call external C functions. I registered the C functions in the NAMESPACE file and include 32bit and 64bit dlls in the packages. If I load the package in 64bit R and calls the external C functions, it works fine. However if I load the package in 32bit R and call the external C functions, it either does not work properly or gives back error message saying cannot find the external C functions.
>
> When I built the same package in R2.15.1, there is no such issue.
>
> I checked the update news for R303 and found most .C is replaced by .Call. I modified the code but the package cannot be loaded and R ended abnormally.
>
> Does anyone know if there any difference of 32bit R303 calling external C from 64bitR303? Thank you!

There's no R303; the current version is 3.1.2.  So if you meant 3.0.3, I'd suggest upgrading.  If you meant something else, you're probably in the wrong place.

For 3.1.2, there are big differences:  32 bit R can't call 64 bit .dlls 
and vice versa.   You can either install the package from source in both 
versions, or arrange to compile both 32 bit and 64 bit dlls, in which case both versions can use the binary of the package.

If you've already done all that, then you'll need to give more details, e.g. access to the source for the package, to get more specific help.

Duncan Murdoch



More information about the R-help mailing list