Taikand
Taikand

Reputation: 278

How to check if my library is used for a Win8 Store app or a Win32 app?

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

Answers (1)

thewhiteambit
thewhiteambit

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:

http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/61829316-fff3-43c7-a86a-cf0e13c66845/

Upvotes: 1

Related Questions