Avoiding duplicate symbol errors during linking by removing classes from static libraries