[Radiance-dev] Radiance compiled with mingw gcc (windows)

Francesco Anselmo francesco.anselmo at arup.com
Mon Sep 12 23:11:52 CEST 2005

Hi Greg,

Thanks for your help.

>Is this the target compiler we had in mind?  I don't know anything  
>about what's available under Windows, if schorsch (Georg Mischler)  
>meant for people to use the more common (and nasty) Visual C  
>standard.  In other words, I'm not sure if by checking in these  
>changes if I'd actually be making matters worse.  For that reason,  
>I'd prefer to leave Windows-related changes to schorsch, though I  
>know he's been busy on other projects lately.

Well, Scons is "smart" enough to figure out what is available
in the system. Georg prepared a Visual C++ oriented platform
configuration for windows in the platform folder, so I guess
it is what he has used so far. Somebody else in this ml has used the
Borland compiler, if I remember well ...
Of course I can wait until Georg finds some time to reply.

I've just noticed I forgot to mention that I've also added
libws2_32 (-lws2_32) to the list of linked libraries to get 
some programs compiled.

>This seems a safe enough change, though rtprocess.h, where RT_PID is  
>defined, is not currently included in ranimate.c and will need to be  

Oh yes, I had to add it.

>The original call:
>     if (fseeko((FILE *)e->data, *(off_t *)p, SEEK_CUR) < 0) {
>could be replaced by:
>     if (fseek((FILE *)e->data, *(off_t *)p, SEEK_CUR) < 0) {
>or even -Dfseeko=fseek on the compile line and it should work for  
>files less than 2 GB in size.  I assume that off_t is defined in your  
>system, otherwise you would have had other errors.  If it isn't  
>defined as "long", then you might need another cast, like so:

>     if (fseek((FILE *)e->data, (long)*(off_t *)p, SEEK_CUR) < 0) {

>Once we find a working substitute, we can add the appropriate macro  
>to platform.h.

I've tried all of them, and they compile. What is strange is that
if I use both -f somefile.cal and -o somefile.dat, the program 
exits nicely without writing the file, but if I remember well
only with windows, not with linux ... strange!
I don't think I'm doing anything wrong ...
I will check it twice, but anyway it is not a problem, since output
to stdout works perfectly to calculate daylight coefficients ...

BTW It looks like the mingw developer are going to add support for large
file system files at some point, probably later than sooner ...

Thanks again for your quick reply.
I think rtcontrib will definitely make my "Radiance life" simpler ;) 
It's oh so good to have all the contributions
from different light sources calculated separately at the same time !!!

Ciao ciao,


More information about the Radiance-dev mailing list