[Bf-committers] VC.Net and the Game Engine

Matthew H. Plough bf-committers@blender.org
Mon, 17 May 2004 03:30:20 -0400


Hi everybody --

On IRC today, Manju discovered an issue with Visual C++.Net and the Game
engine.  Because of Microsoft's stellar standards compliance (as
outlined in
http://support.microsoft.com/default.aspx?scid=kb;en-us;q243451, an
article entitled C++ Standards Noncompliance Issues with Visual
C++.Net), that compiler cannot handle the game engine because of static
const declarations.  Microsoft has further documented the problem in
http://support.microsoft.com/default.aspx?scid=kb;EN-US;241569, "BUG:
C2258 and C2252 on in Place Initialization of Static Const Members".
The compiler cannot handle lines such as lines 270-272 in
blender/source/gameengine/Physics/Sumo/Fuzzics/include/SM_Object.h :

>     static const MT_Scalar ImpulseThreshold = -10.;
>     static const MT_Scalar FixThreshold = 0.01;
>     static const MT_Scalar FixVelocity = 0.01;

Manju suggests changing the declaration types on all of these lines to
const static; he states that doing so removes the problem, in spite of
Microsoft's statements to the contrary.  I am not sure what effect this
will have on Visual C++ 5.0 and 6.0.

Does anyone know if doing so will break other compilers?

Matt