Split off the pure C++ code to be compiled and linked into an individual library.