I created an interface (only .hpp file):
struct IA
{
public:
virtual void foo();
};
and a class implementing this interface (.hpp)
class A : public IA
{
virtual void foo();
}
and .cpp
void A::foo(){...}
this compiles without a problem, but when I use
IA a;
in another file I get this compilation error: "vtable for IA, referenced from: IA::IA() in libSomeOtherFile.a(SomeOtherFile.o) Note: a missing vtable usually means the first non-inline virtual member function has no definition" anyone know why and how do I fix that ?