linmath.h
linmath.h copied to clipboard
Compiling with Visual Studio 2012
Hi,
I was looking for a small but efficient GLSL friendly C library, and found yours very useful. I just wanted to point out couple of things regarding the compilation with the Visual Studio 2012 Express, as C code:
- 'inline' needs to be substituted with '__inline'
- a couple of matrix declarations just need to be shifted before the first function call take place ('mat4x4 S ...;' and 'mat4x4 C;' in 'mat4x4_rotate' fun)
linmath.h is meant to be used using a C99 compiler, where mixed declaration is allowed. Also the inline
keyword is part of C99 as well. Yes, I admit that for use with C++ this library needs some adjustments, but using a modern C compiler, with C99 mode enabled, it works just fine.
Yes, the thing is that Visual Studio has a very bad support for C99. According to MS, this should change with VS 2013 edition, and hopefully it will get a real C99 compile mode.