I'm using Visual Studio 6.

I set my project to get headers from C:\Program Files\R\rw1081\src\include and get 
libraries from C:\Program Files\R\rw1081\src\gnuwin32    (though i'm not running 
gnuwin at all, just Visual Studio 6)

And I added the rdll.lib from C:\Program Files\R\rw1081\src\gnuwin32\rdll.lib

I tried both the one already in there and the one I made from scratch with lib and 
r.exp, as demonstrated in readme.packages.

My example program compiles and runs, unless I add GetRNGstate() and PutRNGstate() as 
prescribed by the manual.  Then it causes a fatal crash after running, where Microsoft 
asks me to send an error report to them.

Any suggestions?

-Amir

#include "stdafx.h"
#include <Rmath.h>
#include <R.h>

double exp_rand();

int main(int argc, char* argv[])
{
 //GetRNGstate();
 double mydouble;
 printf("Hello World!\n");
 mydouble = exp_rand();
 printf("value: %f\n", mydouble);
 //PutRNGstate();
 return 0;
}
        [[alternative HTML version deleted]]

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to