Problem compiling: drand48() not implemented in Windows

Dear Greg,

I have a problem compiling the latest HEAD in Windows.
I think this is because drand48() as used in bsdf.c is not implemented in
Windows/MinGW.

Is there a way to fix this?

Best Regards,

Guy

Hi Guy,

I'll fix this in the HEAD. Meanwhile, you can put the following near the beginning of bsdf.c:

#define drand48() (rand()*(1./MAX_RAND))

Cheers,
-Greg

···

From: Guy Vaessen <[email protected]>
Date: April 8, 2011 3:44:17 PM PDT

Dear Greg,

I have a problem compiling the latest HEAD in Windows.
I think this is because drand48() as used in bsdf.c is not implemented in Windows/MinGW.

Is there a way to fix this?

Best Regards,

Guy

Forgive my failing memory. That should have been:

#define drand48() (rand()*(1./RAND_MAX))

Looks like you'll need the same define in hilbert.c as well.

Cheers,
-Greg

···

From: Guy Vaessen <[email protected]>
Date: April 8, 2011 3:44:17 PM PDT

Dear Greg,

I have a problem compiling the latest HEAD in Windows.
I think this is because drand48() as used in bsdf.c is not implemented in Windows/MinGW.

Is there a way to fix this?

Best Regards,

Guy