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.
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:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.