[R] GetRNGstate() crashes with 'Segmentation fault'

Timur Elzhov Timur.Elzhov at jinr.ru
Fri Dec 20 17:35:08 CET 2002


Dear R-masters,


I tried to compile this simpel C-code:

//-----------------

#include<R.h>

int main()
{
    GetRNGstate();
    return 0;
}
 
//-----------------

Compiling:

~> gcc -o a  a.c -I/usr/lib/R/include/ -L/usr/lib/R/bin/ -lR
~> ldd a
        libR.so => /usr/lib/libR.so (0x40018000)
        libc.so.6 => /lib/libc.so.6 (0x401a8000)
        libblas.so.2 => /usr/lib/libblas.so.2 (0x402bb000)
        libreadline.so.4 => /lib/libreadline.so.4 (0x4031e000)
        libdl.so.2 => /lib/libdl.so.2 (0x40347000)
        libncurses.so.5 => /lib/libncurses.so.5 (0x4034a000)
        libm.so.6 => /lib/libm.so.6 (0x40389000)
        libz.so.1 => /usr/lib/libz.so.1 (0x403ab000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

~> ./a
Segmentation fault


Where am I wrong?
I'm using R 1.6.1, glibc-2.3.1 on Debian woody system.

Thanks a lot!

--
WBR,
Timur.




More information about the R-help mailing list