cpp: add formatters to linked libraries