Given the following prerequisits:
shared.h
struct A {
int x;
int y;
}
typedef set<A> setOfA;
implementation1.cpp
#include "shared.h"
void Implementation1::someFunction()
{
//...
setOfA setinstance;
//...
Implementation2* i = new Implementation2();
i->functionF(setinstance);
}
implementation2.h
#include "shared.h"
void Implementation2::functionF(setOfA&);
EDIT: now this should be clearer...
I want to pass a setOfA
to another function of a different class - everything is compiling just fine. I get the following linker problem:
undefined reference to
'implementation::functionF(std::set<A, std::less<A>, std::allocator<A> >&)'
Just to get it right - the implementation could not be found, right? This cannot be a typedef problem, because everything compiles just fine... What am I missing here?