andreasmuller / ofxCubeMap

Addon for working with Cube Maps in openFrameworks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

far and near are reserved words in WinDef.h

brunoimbrizi opened this issue · comments

When trying to compile ofxCubeMap on Windows – Code::Blocks 12.11, the following error appears for both lines 125 and 126:
[...] \openFrameworks\addons\ofxCubeMap\ofxCubeMap.h|125 | error: declaration does not declare anything [-fpermissive]

Lines 125 and 126 are:

float near;
float far;

According to this post, both near and far are reserved words on WinDef.h
http://stackoverflow.com/questions/16814409/windef-h-why-are-far-and-near-still-here-c

I don't understand everything that is going on here. As a quick solution, I just renamed them to _near and _far and it worked. There is probably a better solution though.