[MOAB-dev] MOAB build on windows
James Porter
jvporter at wisc.edu
Thu Aug 20 14:52:52 CDT 2009
On Thu, 2009-08-20 at 14:30 -0400, Alfred von Loebbecke wrote:
> James Porter wrote:
> > On Thu, 2009-08-20 at 13:40 -0400, Alfred von Loebbecke wrote:
> >
> >> Hi Jim,
> >> thank you for your response.
> >> the thing is that visual studio 2005 is requesting the use of of the
> >> /clr switch
> >> in a number of places when building MOAB. for example:
> >>
> >>
> >> MBRange.cpp
> >> c:\win_xp_create_mg\3rd_party\moab\MBRange.hpp(664) : error C4980:
> >> '__value' : use of this keyword requires /clr:oldSyntax command line option
> >> c:\win_xp_create_mg\3rd_party\moab\MBRange.hpp(664) : error C3630: error
> >> when processing the token '__value'
> >> c:\win_xp_create_mg\3rd_party\moab\MBRange.hpp(664) : fatal error C1190:
> >> managed targeted code requires a '/clr' option
> >> MBOrientedBoxTreeTool.cpp
> >>
> >
> > That's a bug in MOAB (sort of). "__value" is a keyword[1] in MSVC, so it
> > won't compile because it knows that keyword can't be used without
> > managed code. It can't be used *with* managed code in that context
> > either, since it won't parse correctly.
> >
> > It's not technically legal for us to prefix identifiers with two
> > underscores, since that's reserved for compiler authors, so I've changed
> > it in SVN. If you don't want to use the latest SVN build, you can just
> > change "__value" to "value" on that line and on line 666.
> >
> > - Jim
> >
> > [1] http://msdn.microsoft.com/en-us/library/k7kkeb76.aspx
> >
>
> ok, thank you, that worked well.
> I don't have access to the MOAB svn but I'll ask my colleague (Clinton
> Stimpson)
> if he can get me the newest source. In the meantime I'd appreciate any
> tips for the
> three remaining errors:
>
> ..\..\..\Win_XP_Create_MG\3rd_party\MOAB\MBSysUtil.cpp(20) : error
> C2146: syntax error : missing ';' before identifier 'uint16_t'
> ..\..\..\Win_XP_Create_MG\3rd_party\MOAB\MBSysUtil.cpp(20) : error
> C4430: missing type specifier - int assumed. Note: C++ does not support
> default-int
>
> c:\win_xp_create_mg\3rd_party\moab\MBMatrix3.hpp(255) : error C3861:
> 'finite': identifier not found
>
> thank you and regards,
> Alfred
>
>
The first two errors can be resolved by adding "typedef unsigned __int16
uint16_t;" somewhere near the top of the file (it may be necessary to
put it in a common header somewhere in MOAB). The last one can be
resolved by adding a single underscore before "finite". These are a
little bit harder to fix in general than the previous errors, but I'll
figure something out.
- Jim
More information about the moab-dev
mailing list