I'm working on an open-source project: https://github.com/daniftodi/metal
I have ArrayHolder class defined in holders/ArrayHolder.h and implemented in holders/ArrayHolder.cpp
My code compiles; but in my main.cpp; I need to:
#include "holders/ArrayHolder.cpp"
If I don't do that; I get this error:
main.cpp.o:(.rodata._ZTV11ArrayHolderI8FunctionE[_ZTV11ArrayHolderI8FunctionE]+0x10): undefined reference to `ArrayHolder<Function>::put(Function*)
I don't understand problem and can't find a solution. Please help me.