[Radiance-dev] Radiance compiled with mingw gcc (windows)
pisuke at blueyonder.co.uk
pisuke at blueyonder.co.uk
Sat Oct 8 16:35:50 CEST 2005
Hi Greg and Georg,
I've just re-compiled Radiance with mingw, and it has been easier.
Also, the rtcontrib file output problem has disappeared, and I think
it has been fixed at revision 1.27
Here is the list of changes I've done to the Scons scripts,
I hope this time they make more sense:
diff -r ray/platform/mingw.cfg ray_ok/platform/mingw.cfg
13c13
< CPPDEFINES: _WIN32 NDEBUG _CONSOLE _MBCS HDSUF=.exe fseeko=fseek
---
> CPPDEFINES: _WIN32 MINGW NDEBUG _CONSOLE _MBCS HDSUF=.exe fseeko=fseek
18c18
< CPPDEFINES: _WIN32 _DEBUG _CONSOLE _MBCS HDSUF=.exe fseeko=fseek
---
> CPPDEFINES: _WIN32 MINGW _DEBUG _CONSOLE _MBCS HDSUF=.exe fseeko=fseek
(I've added the MINGW macro to fix the following problem in rpict)
diff -r ray/src/rt/rpict.c ray_ok/src/rt/rpict.c
16a17
> #ifndef MINGW
17a19,21
> #else
> #include <sys/time.h>
> #endif /* MINGW */
(this is because <sys/times.h> is not available with mingw,
while <sys/time.h> is)
diff -r ray/src/gen/SConscript ray_ok/src/gen/SConscript
6a7
> socketlib = env['RAD_SOCKETLIB']
27,28c28,29
< ('mkillum', Split('mkillum.c mkillum2.c mkillum3.c'),
< ['rtproc','rtscene','rtpath','rtmath','rtio','rtcont','rterror']),
---
> #('mkillum', Split('mkillum.c mkillum2.c mkillum3.c'),
> # ['rtproc','rtscene','rtpath','rtmath','rtio','rtcont','rterror']),
33a35
>
44c46,53
< 'rtmath','rtcont','rtmem','rtargs','rtpath','rterror'] + mlib)
---
> 'rtmath','rtcont','rtmem','rtargs','rtpath','rterror','rtproc'] + mlib)
> progs.append(prog)
>
> prog = env.Program(target=os.path.join('$RAD_BUILDBIN', 'mkillum'),
> source=Split('mkillum.c mkillum2.c mkillum3.c'),
> CPPPATH=env.get('CPPPATH', []) + ['#src/rt'],
> LIBS=['raycalls','rttrace','rtscene','rtpic','rtfunc','rtio',
> 'rtmath','rtcont','rtmem','rtargs','rtpath','rterror','rtproc'] + mlib
+ socketlib)
(I've taken mkillum out of the prog targets, because it needs "socketlib",
and slightly changed the mksource library list)
diff -r ray/src/ot/SConscript ray_ok/src/ot/SConscript
17,18c17,18
< source=p[1], LIBS=['rtproc','rtscene','rtio','rtpath','rtmath',
< 'rtargs','rtcont','rtmem','rterror']+mlib)
---
> source=p[1], LIBS=['rtscene','rtio','rtpath','rtmath',
> 'rtargs','rtcont','rtmem','rterror','rtproc']+mlib)
(worked only when I moved rtproc to the end of the list)
diff -r ray/src/px/SConscript ray_ok/src/px/SConscript
43c43
< ('ra_bmp', ['ra_bmp.c'], ['rtpic','rtproc','rtio','rtmem']),
---
> ('ra_bmp', ['ra_bmp.c'],
['rtpic','rtmem','rtproc','rtio','rtargs','rterror','rtpath']),
(additional libraries required to compile ra_bmp)
diff -r ray/src/util/rad.c ray_ok/src/util/rad.c
1515c1515,1516
< RT_PID pid, sig;
---
> RT_PID pid;
> int sig;
(sig needs to be declared as int)
diff -r ray/src/util/rpiece.c ray_ok/src/util/rpiece.c
11a12,13
> #include "platform.h"
>
16d17
< #include "platform.h"
(platform.h needs to be included before #ifndef NON_POSIX)
The binaries are available here:
http://www.bozzograo.net/radiance/modules.php?op=modload&name=Downloads&file=index&req=getit&lid=12
Thanks,
Francesco
More information about the Radiance-dev
mailing list