Hello, dear R experts!
I run R on Debian 'sarge' platform. There is 'r-mathlib' package in
Debian distribution, which is described as:
$ dpkg --status r-mathlib
...
This packages provides the libRmath shared and static libraries which
can be called from standalone C or C++ code.
Well, I use runif() function in test_runif.c:
#include <Rmath.h>
main()
{
// ...
printf("%f\n", runif(0, 1));
}
and compile it:
$ gcc -I/usr/lib/R/include -lRmath -lm -o test_runif test_runif.c
/tmp/ccmICWeD.o(.text+0x2d): In function `main':
: undefined reference to `Rf_runif'
collect2: ld returned 1 exit status
Replacing `-lm' with `-lR' solves the problem. So, I need libR.so anyway?
Thanks.
--
WBR,
Timur
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html