McStas and W32

Kristian Nielsen kristian.nielsen at risoe.dk
Mon Jan 25 12:55:17 CET 1999


Dear Peter Link,

> I tried the Win32 compilation and I think in basic view it works.
> Although I'm a little concerned about some compiler warnings ( VC++,
> Microsoft, WinNT):
> 
> /usr/share/misc/bison.simple(387) : warning C4013: 'yylex' undefined;
> Suppose: extern mit Rueckgabetyp int
> /usr/share/misc/bison.simple(590) : warning C4013: 'yyerror' undefined;
> Suppose: extern mit Rueckgabetyp int
> instrument.y(745) : warning C4716: 'yyerror' : has to return a value
> e:\mcstas\rotation.c(153) : warning C4101: 'k' : unreferenced local
> variable

These warnings sound completely harmless. I think the tradition in the
Unix world is to have less strict compilers than in the Windows world.

> I also wonder whether there exists a possiblility to use front-ends like
> gscan with Win32?

The possibility is there, but we have no experience with what kind of
problems may turn up.

To use gscan, the program Perl is needed. According to my information,
this is available for Windows 95/98/NT. So with luck you could just
install Perl and gscan should work. The graphics frontends also use the
PGPLOT graphics library and an interface betwenn PGPLOT and Perl. PGPLOT
has been ported to Windows, I do not know about the Perl interface.

In short, if you can install the required supporting programs and
libraries, in theory you should be able to use the front-ends in
Windows. Unfortunately, we do not use Windows here at Risø for McStas,
but if you have any problems I will do my best to help you.

> Last but not least I discussed with Georg Artus a collegue here in
> Munich about source definition. source_flat has a circular face. As my
> beamtube will have a rectangular nose I ask myself about the best way to
> implement this.

The quick way (which I have used myself on occasion) is to put a
rectangular slit just in front of the circular source, though you will
waste a bit of computation time in this way. Alternatively, it is a
two-minute modification to the Source_flat component to make it simulate
a rectangular source rather than a circular one; I will be happy to
write it and send it to you if you need it.

Good luck using McStas!

 - Kristian.






More information about the mcstas-users mailing list