Skip to content
Prev 39138 / 63421 Next

Writting my own package - 64 bit problem with R_GetCCallable

Ryan,
On Feb 11, 2011, at 4:29 PM, Ryan King wrote:

            
This is the key issue - you're missing the declaration of R_GetCCallable() as the compiler tells you, so the compiler assumes "int" as the return value. However, int is only 32-bit so it won't hold a 64-bit pointer and hence you're in trouble.

All you really need is

#include <R_ext/Rdynload.h>

before you use R_GetCCallable and hopefully your issues should go away.

Note that your bug is there even in 32-bit -- you will see " implicit declaration of function" in any case -- it just is not fatal, incidentally. It is a good idea to listen to the compiler ... ;).

Cheers,
Simon