Using a C++ Library (built using Visual C++ 2010) in a Windows 8 Store app (built using Visual C++ 2012)

后端 未结 1 1226
梦谈多话
梦谈多话 2021-01-16 06:30

I have a C++ library built using VC++ 2010. I have the headers, import libs and DLLs for this library. I want to use this library in my Windows 8 Store app that I am tryin

1条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-16 07:22

    You cannot use C++ binaries built using older version of Visual Studio (older than Visual Studio 2012) in your Windows 8 Store apps.

    The reason for that is because a binary built using say Visual Studio 2010 will have a dependency on the C++ Runtime DLLs from Visual Studio 2010. Whereas the rest of your app is written using Visual Studio 2012 so it will have a dependency on C++ Runtime DLLs from Visual Studio 2012. The latter is made automatically available from the Windows Store (read this for more details). However the former is not available on the Windows Store. Also, there is no way for your app to express a dependency on VC2010 Runtime. Including VC2010 Runtime DLLs inside the app package will also not work since the package will be rejected at Store upload time.

    Therefore the best option is to build all sources for your Windows 8 Store app strictly using Visual Studio 2012.

    0 讨论(0)
提交回复
热议问题