Hi, Thanks!
--- Jos� Matos <[EMAIL PROTECTED]> wrote: > I guess that you intended to send this message to the list. :-) > > On 02/03/06, Globe Trotter <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Thanks, everyone for all the help! So, here is my calling function in C > (called > > test.c): > > > > > > > > #include<stdio.h> > > #include<stdlib.h> > > #include<Rmath.h> > > > > > > int main(void) { > > printf("%f \n",pchisq(2.,7., 1, 0)); > > printf("%f \n",pnchisq(2.,7.,0., 1, 0)); > > return EXIT_SUCCESS; > > } > > > > > > I compile using: > > > > gcc test.c -I/usr/lib/R/include -L/usr/lib/R/lib -lm -lR > > Why do you link against libm? > > Shouldn't it be > gcc test.c -I/usr/lib/R/include -L/usr/lib/R/lib -lRmath -lR > ? I linked against libm because Rmath.h includes math.h so I thought that maybe those links are needed. But even linking this does not give the correct answer (for pchisq). Something else is going on. I could not also get the runif to work. Thanks! ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html