The dynamic.hpp header has some template specializations in it, which means that if it is included in multiple compilation units, it produces a multiple definitions linker error when you go to link them together (because the object code for the specializations gets generated twice). If you want to use template specializations like that, you need to put them in a .cpp file and generate an object file to hold them.
I think an alternative may be to make the specializations themselves still templates, somehow. Or to inline the specializations.
The
dynamic.hpp
header has some template specializations in it, which means that if it is included in multiple compilation units, it produces a multiple definitions linker error when you go to link them together (because the object code for the specializations gets generated twice). If you want to use template specializations like that, you need to put them in a .cpp file and generate an object file to hold them.I think an alternative may be to make the specializations themselves still templates, somehow. Or to inline the specializations.