4

I... feel really silly asking this, but I'm not sure how to resolve the problem.

This is a little snippit of my code (Objective-C++):

#include "eq/eq.h"
namespace eqOther
{
    class Window : public eq::Window //<-- Error occurs here
    {
    public:
        Window( eq::Pipe* parent ) : eq::Window( parent ) {}

        void popup();

    protected:
        virtual ~Window() {}

        virtual bool processEvent( const eq::Event& event );

    private:

    };
}

And the error I'm getting is: Use of 'Window' is ambiguous and it says it's declared in X.h as typedef XID Window and in window.h as class eq::Window which is its superclass.

The class I'm declaring should be in namespace eqOther yea? eqOther::Window is different than eq::Window!?

I feel soooo dumb, but I just don't see what I've done wrong...

Stephen Furlani
  • 6,794
  • 4
  • 31
  • 60
  • Are you getting a warning, or an error message? – apaderno Jul 09 '10 at 13:06
  • 1
    I would use `::eq::Window` just to be sure. But I can't see what you've done wrong either. It's complaining that your type name clashes with a typedef defined in the rood namespace. Did you do an include of `X.h` inside the namespace declaration for `eqOther`? – Omnifarious Jul 09 '10 at 13:08
  • 2
    you sure you don't have some "using namespace eq;" somewhere in your headers? – Dmitry Yudakov Jul 09 '10 at 13:08
  • Augh! That was it @Dmitry! Stupid! And of course, it didn't throw any other errors because "window.h" was included after "stupidme.h" and everything else was before it. Sigh... thanks guys! @Dmitry, put your comment as an answer so I can accept it! – Stephen Furlani Jul 09 '10 at 13:29

1 Answers1

2

Perhaps you have some using namespace eq; somewhere in your headers

Dmitry Yudakov
  • 15,364
  • 4
  • 49
  • 53