Looks like you need additional
shared.cpp and shared.hpp files which will declare and define shared function to be used in (other) various compilation object.