Hello
Different parts of my codebase will use various back-ends e.g. the rendering system can used Direct3D11 or OpenGL, the audio system can use OpenAL or FMOD, etc. Since The choice of those back-ends is made at compile time, the specific implementations have their own header and source files. There is also a set of headers that include the porper implementation depending on some defines. E.g. OpenalAudioDevice.h/.cpp implement the OpenAL version of the AudioDevice, FmodAudioDevice.h/cpp implement the FMOD version of the same class and the header AudioDevice.h includes the appropriate implementation depending on some defines.
The problem i have with such a setting is that i don't want to compile and link the implementations i don't use for a given configuration. I'm not sure how i could do that in a practical way.
I'm using Visual Studio 2013 and C++ for Windows implementation but i'm planning to have a version for OSX using Xcode. Also, some of these choices will be determine by the platform e.g. Windows will Direct3D only, OSX will be OpenGL only. FMOD or OpenAL on the other hand can be chosen on both platforms.