I'm using MSVC on XP and I've a problem with gsl_rng_set. When I use this function, my program compiles and links correctly but fails at execution. Here is my piece of code :
unsigned long int seed;
seed = unsigned long int(GetTickCount());
gsl_rng_set(GSL_RNG,seed);
gsl_rng_env_setup();
GSL_RNG_TYPE = gsl_rng_mt19937;
GSL_RNG = gsl_rng_alloc (GSL_RNG_TYPE);
I already had this problem for RNG without gsl_rng_set, but solved it using GSL_DLL in the preprocessor definition.
Can someone help me ?
Thanks.
Olivier
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I'm using MSVC on XP and I've a problem with gsl_rng_set. When I use this function, my program compiles and links correctly but fails at execution. Here is my piece of code :
I already had this problem for RNG without gsl_rng_set, but solved it using GSL_DLL in the preprocessor definition.
Can someone help me ?
Thanks.
Olivier
Here is the problem : set the seed before allocation of the RNG ...
Simply have to change lines order ...