Windows compilation
Kristian Nielsen
kristian.nielsen at risoe.dk
Fri Jan 21 09:03:06 CET 2000
> Date: Thu, 20 Jan 2000 15:05:21 -0600
> From: "Ankner, John" <jankner at anl.gov>
> Having looked at the messages in the mailing list archive, I am unable to
> determine what steps are required to compile the mcstas distribution using
> Visual C++ on a Windows NT box. In particular, there are a lot of files of
> unknown provenance in the unpacked mcstas-1.17A4 directory and I don't know
> which to transfer to my NT directory. In addition, I am not clear on the
> redefinition of the WIN32 macro -- to what should I redefine it? Anybody
Just copy all of the files ending in ".c" and ".h". Then ask your
compiler to compile all the ".c" files into a 32-bit console
application called "mcstas.exe".
You should also copy the "lib" subdirectory to C:\mcstas\lib on the
Windows machine (you can copy it to some other directory if you define
the C preprocessor macro MC_SYS_DIR to be the directory name as a
string).
The definition of WIN32 can be anything, the usual convention is to set
it to the number 1. I think there is some menu entry somewhere in Visual
C++ to set it, otherwise you could probably put the line
#define WIN32 1
at the top of the file "port.h".
If you get problems compiling the C files generated by McStas, try using
the "--portable" flag on the mcstas compiler. Or even better, tell me
how to create a new directory in Visual C++ (this is the only thing in
the generated simulations that is not pure ANSI C).
I am happy that someone is once again looking into compiling McStas on
Windows. If your compiler is unhelpful and spits out nasty error
messages, send them in an email and I will try to sort things out.
- Kristian.
--
Kristian Nielsen kristian.nielsen at risoe.dk
Risø National Laboratory
Condensed Matter Physics and Chemistry Department
Tel. +45 4677 5515 Fax +45 4677 4790
More information about the mcstas-users
mailing list