Several files contain objects called Rectangle. For example it could be this version, from wingdi.h:-
or this version which is a c'tor in a library called gdkmm:-
and the source code I'm building says this:-
but when I try to compile this with VS2005 it gives me this error:-
error C2872: 'Rectangle' : ambiguous symbol
could be 'C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\wingdi.h(3514) : BOOL Rectangle(HDC,int,int,int,int)'
or 'F:\+GTK-SOURCES\gnu-windows\include\gdkmm/rectangle.h(42) : Gdk::Rectangle'
Obviously it's easy to fix - but why do I even get the error?? I've told it to use namespace Gdk - but even if I hadn't done that, the gdk version is the only one with a matching function signature. So why is the compiler even confused about this :confused:
Code:
WINGDIAPI BOOL WINAPI Rectangle(HDC,int,int,int,int);
Code:
namespace Gdk
{
class Rectangle
{
public:
Rectangle();
// whatever...
};
}
Code:
using namespace Gdk;
Rectangle monitor;
Quote:
error C2872: 'Rectangle' : ambiguous symbol
could be 'C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\wingdi.h(3514) : BOOL Rectangle(HDC,int,int,int,int)'
or 'F:\+GTK-SOURCES\gnu-windows\include\gdkmm/rectangle.h(42) : Gdk::Rectangle'