ivansafrin / Polycode

Polycode is a cross-platform framework for creative code.
polycode.org
MIT License
2.38k stars 348 forks source link

Bindings compilation error on Windows due to usage of near & far #689

Open fodinabor opened 8 years ago

fodinabor commented 8 years ago

On Windows near and far are macros and cannot be used as variable names.

Number Ray::boxIntersect(const Vector3 &box, const Matrix4 &transformMatrix, float near, float far) const uses these variable names and it works as they are parameters. But in the wrapper headerfiles for the scripting languages this does not work!

https://github.com/ivansafrin/Polycode/blob/goodbye_cmake/include/polycode/bindings/javascript/PolycodeJSWrappers.h#L4459 https://github.com/ivansafrin/Polycode/blob/goodbye_cmake/include/polycode/bindings/lua/PolycodeLuaWrappers.h#L10806

Possible fix: rename the parameters