I have some code I would like to share in some kind of library project between Win32 and UWP (Universal Windows) projects, how can I do this?
So far I have tried combinations of static, dynamic and WinRT libraries, each time I try to reference them, either the UWP or Win32 project complain that the project being referenced is not compatible. I have seen others copy references to the same code into multiple Visual Studio projects - but this doesn't seem very nice.
I should add that the code I wish to share between the projects is completely compatible with UWP and Win32 (it's a maths module, no low level Windows calls etc.).
My desired code structure:
- Visual Studio Solution
- SharedLib (either static or DLL)
- C++ source (in single place)
- Win32 app [references SharedLib]
- UWP App (Universal Windows) [references SharedLib]