There is something missing in this story. If you "need to write about 100 lines of additional tedious-to-write code into these source files in order to link it" then how would linking to a shared object library work without such code? And if there is some way to automate linking then you should be able to automate using C++ files in another directory. Without fully understanding this, I agree with your boss. Best to have one executable and figure out how to organize the code to remove the pain.