I'm trying to import some working Visual C++ code into Qt Creator and I'm having some compilation error I can't explain. This is my code:
// TabSprite.h
#include <GraphicsItem.h>
namespace appetizer {
class TabSprite : public GraphicsItem {
public:
TabSprite(GraphicsWindow* parentWindow);
}
// TabSprite.cpp
#include <TabSprite.h>
using namespace appetizer;
TabSprite::TabSprite(GraphicsWindow* parentWindow): GraphicsItem(parentWindow) {
}
And Qt Creator give me this error (at the constructor declaration in TabSprite.cpp
):
Undefined reference to 'appetizer::GraphicsItem::GraphicsItem(appetizer::GraphicsWindow*)
However GraphicsItem
is properly declared in GraphicsItem.h
so I don't understand why the compilers doesn't find it. Can anybody see what could be wrong with this code?