john-chapman / im3d

Immediate mode rendering and 3d gizmos.
MIT License
1.18k stars 63 forks source link

Errors compiling with VS2012 #29

Closed devds closed 6 years ago

devds commented 6 years ago

Hi,I am having errors during VS2012 compilation: for example : error C2864: 'Im3d::Vector::m_size' : only static const integral data members can be initialized within a class ::m_capacity' : only static const integral data members can be initialized within a class ): error C2864: 'Im3d::Vector::m_data' : only static const integral data members can be initialized within a class and many others How to fix?

john-chapman commented 6 years ago

Hi,

Non-static data data member initializers are a C++11 feature. VS2012 has quite poor support for C++11, but if you really need it to work you could hack Im3d by moving the initialization of these variables to the class constructors. You will also need to patch the use of alignof as I think this is also not supported in VS2012.

john-chapman commented 6 years ago

Closing this issue unless there are any further questions.