Today I succeeded in compiling Radiance 4.0 HEAD snapshot on Windows.
I had to make to following modifications to make it work:
*Gendaylit*
To make Gendaylit compile I had to add the following line in:
ray\src\gen\SConscript under the section PROGS = (
*('gendaylit', Split('gendaylit.c sun.c',), ['rtlamps']),
*I changed the following line in: ray\src\common\SConscript*
*RTLAMPS = Split('''fropen.c rexpr.c lamps.c''')*+ [getlibpath]*
*Dctimestep*
To make dctimestep compile I had to add the following line to:
ray\src\common\SConscript under the section # build libraries*:
rtall = env.StaticLibrary(target=radlib('rtall'), source=ALL)**
···
*
I changed in ray\src\util\SConscript
('dctimestep', ['dctimestep.c'],
*['rtall'])*
(I think that including all library functions for dctimestep probably is way
to much, but I don't know the minimal set to include. This way dctimestep
compiles fine.)
Another problem I ran into:
When compiling tmapluv.c the compiler complained about a variable
declaration that was already declared elsewhere.
tmapluv.c includes tiffio.h, which inturn (on Windows) includes windows.h,
which includes windef.h
In windef.h the the following declaration is made: typedef unsigned char
BYTE
This declaration gives problems with tmapluv.c where BYTE is also declared.
As a workaround I commented typedef unsigned char BYTE out in windef.h.
After that the compiler compiles tmapluv.c
After that the compiles continues, but very soon fails again I then removed
the comments from windef.h and the compiler finally finisches building
Radiance.
Question: is it possible to change the declaration of BYTE in tmapluv.c or
tell the compiler to not include windef.h without producing errors? (I am
not a programmer, so I didn't dare mess with it myself)
For compilation I used:
Radiance 4.0 + latest snapshot of the HEAD archive
MinGW with gcc 4.5.0
Phyton 2.7 + scons 1.3.1
compiler optimalisations: -O3 -march=native (for a core2duo)
I hope this is helpfull.
Best Regards,
Guy