Okay I'm still quite new to win32 programming, but it seems that in order to include gl.h you need to include windows.h as well. What a pain... on top of that, I have a class called Polygon, but it would seem that microsoft has already defined some sort of Polygon class or structure. I would like to keep my Polygon class that I have created myself so I tried using namespaces but am running into problems. Here is a rough outline of what I have:
Polygon.h:
namespace myNameSpace{
class Polygon{
...
};
}
Polygon.cpp:
using namespace myNameSpace;
...
<function definitions>
...
PolygonModel.h:
using namespace myNameSpace;
class PolygonModel{
public:
...
void setPolygons(Polygon* _polys);
...
private:
Polygon* polys;
...
};
PolygonModel.cpp
using namespace myNameSpace;
...
<function definitions>
...
When I try to compile PolygonModel however, I get messages complaining about 'ambiguous symbol Polygon' or 'syntax error: identifier Polygon'. Any ideas? I tried a couple of variations with the name spaces and if I do myNameSpace::Polygon for every occurence of the string Polygon in PolygonModel.cpp things work out but this is ugly :p I would like to just declare the namespace at the beginning and be able to refer to myNameSpace::Polygon as just plain 'Polygon' throughout the file...