Reputation: 278
As the title suggests I'm trying to build a library ( a small DirectX renderer) to be used both in a Windows8/Metro App, while also be usable for developement of Desktop apps using Win32.
To be more precise I'm wondering if I can use some sort of pre-processor directive to detect the target platform and separate the difference of code between these platforms using them, and if there exist where exactly can I get more information about that.
Upvotes: 1
Views: 130
Reputation: 1436
You can not, once a library has been build, pre-processor directives are already processed. This is why you would have to build two librarys, one for each purpose.
This link might answer further questions:
Upvotes: 1