MCStas
Kristian Nielsen
kristian.nielsen at risoe.dk
Tue Nov 10 13:20:27 CET 1998
> Kristian,
>
> As we'd discussed during the conference, I've been trying to get
> MCStas running under windows. I'm having a problem...
>
> The problem occurs in the yyparse function in instrume.c. This is the
> bison parser, and I'm having some trouble isolating the problem. My
> best guess at the moment is all the
> #line x "/usr/share/misc/bison.simple"
> since that file doesn't actually exist on my machine (OK, it's not the
> most difficult guess in the world). Do you know what that file is? Or
> where I can find a copy, preferably windows compatible?
This file is not related to your problem. The #line bit just tells your
C compiler that the following code was copied from a file of that name,
so that error messages can refer to the original file. You can safely
delete all the #line's, but that is unlikely to make any difference.
You do not give much information, perhaps you could send me the exact
error message of the compiler (and perhaps also information on what
compiler you are using)?
As far as I know, with Microsoft visual C two problems occur, both in
the linker phase. One is a missing strcasecmp() function and one is a
missing alloca() function. I believe you can solve this by replacing
strcasecmp() with stricmp() (or plain strcmp() if stricmp also does not
work); and by having the compiler define the preprocessor symbol MSDOS
(or put the line '#define MSDOS 1' in mcstas.h).
> As to other changes that have been required, most have revolved around
> the file system, changing the separator '/' to '\'. Also, I had to
Yes.
> declare the variable read_components in mcstas.h as extern, or I got an
> error for this being declared in every file. I'm not sure if that will
> cause problems down the road - was that defined anywhere else?
Yes, this is a bug! I have fixed it in my source, it wil be in the next version.
> Thanks for your help,
You are welcome. Let me know what you find; once we get it working you
should send me your changes so that the next version of McStas works
with Windows.
- Kristian.
More information about the mcstas-users
mailing list