locked
one static library for both desktop app and metro app

    Question

  • I have a desktop static library and want to use it for both desktop app and metro app. It does not use any of the non-metro APIs.

    is there any drawbacks for using such desktop static library in metro app?

    thanks!

    Tuesday, October 09, 2012 4:15 PM

All replies

  • You can use a portable library.

    See this:

    What is Portable Class Library project in Visual Studio 2012– .NET 4.5


    Sara Silva

    Tuesday, October 09, 2012 8:43 PM
  • The static libraries I have are C/C++, not VB or VC#. So could not use Portable Class Library. 

    Is there a equivalent project type in C/C++ as VB's Portable Class Library? 

    Jennifer 

    Tuesday, October 09, 2012 8:54 PM
  • You didn´t say information about it :)

    If the library use the C++ standard i think is possible, because you can add the file to C++ project, but if use C i think is not possible.


    Sara Silva

    • Proposed as answer by saramgsilvaMVP Saturday, October 20, 2012 9:03 PM
    Tuesday, October 09, 2012 9:02 PM
  • Sorry. Let me explain it more. 

    The static library is like a C library: say myCLib.lib. First of all it should be able to work with any desktop app built with VS2008/VS2010/VS2012, is it possible to have the same myCLib.lib to be used by VS2012 metro app?  

    I guess that myCLib.lib has to be built with VS2012, right? if so, can it be used by VS2008 project?


    Tuesday, October 09, 2012 9:16 PM