aap/librw

Compilation fails

goodidea82 opened this issue · 3 comments

Downloaded the master branch on 09.July.2017. Using Visual Studio 2015. When building the librw project I get the following compiler errors:

error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax librw 2017_06_librw-master\src\geometry.cpp Line 157

The problematic line is this:
defaultSurfaceProps = (SurfaceProperties){ 1.0f, 1.0f, 1.0f };

Error C2065 "M_PI": Undeclared identifier
librw 2017_06_librw-master\src\base.cpp Line 259

The line is : angle = angle*M_PI/180.0f;

BTW. Are the links up-to-date?
http://gtaforums.com/topic/752450-rel-renderware-file-converter/

In case my compiler is too old, it would be cool if these two problems could be fixed and in this way improve compatibility with different compilers.

aap commented

Both should be fixed now, but untested. The first thing is only a feature in C, I had assumed it was valid C++ as well, but C99 support in MSCV is bad.

Compilation with Visual Studio 2015 is working now.