My fault. For Windows, there needs to be a line:
#define _USE_MATH_DEFINES
before including math.h. Jan and Wendelin -- please make this addition to your version of gendaylit.c so the problem doesn't come back. (I had fixed this before the new check-in.)
Thanks for the heads-up, Pally!
-Greg
···
From: Pally Sandher <[email protected]>
Date: August 14, 2013 10:51:47 AM MDTGendaylit fails to compile with the following error:
1>..\..\..\src\gen\gendaylit.c(186): error C2065: 'M_PI' : undeclared identifier
To use Math Constants such as M_PI in Visual Studio you need to define _USE_MATH_DEFINES -> http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
I added it to the pre-processor definitions in the project settings for gendaylit.c & it builds without error but you could add it in the source itself.
This is using the latest “combined” code from the repository at http://public.kitware.com/gitweb?p=radiance.git