在Windows 8 Metro应用程序中使用旧的C/C ++库 [英] Use old C/C++ library with windows 8 metro app

查看:103
本文介绍了在Windows 8 Metro应用程序中使用旧的C/C ++库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用开源库( Linphone )用C/C ++编写. 我尝试在VS11中导入它,但没有成功. 我有所有可能需要的.dll文件.

I'm trying to create an application (in C#) for Windows 8 / Windows Phone 8 using an open-source library (Linphone) written in C/C++. I tried importing it in VS11, no success. I have all .dll files that could be needed.

是否可以使用带有或不带有VS11的该库来创建我的应用程序?

Is there a way to create my app using this library with or without VS11?

谢谢.

推荐答案

您不能在Windows 8应用商店应用中使用由Visual Studio的较早版本(比Visual Studio 2012早)构建的二进制文件.

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

之所以这样,是因为使用Visual Studio 2010构建的二进制文件将依赖于Visual Studio 2010中的C ++运行时DLL.而应用程序的其余部分是使用Visual Studio 2012编写的,因此它将依赖于Visual Studio 2012中的C ++运行时DLL.后者可以从Windows应用商店中自动获得(阅读以了解更多详细信息).但是,前者在Windows应用商店中不可用.此外,您的应用也无法表达对VC2010 Runtime的依赖性.在应用程序包中包含VC2010 Runtime DLL也不起作用,因为该包将在商店上载时被拒绝.

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.

因此,最好的选择是严格使用Visual Studio 2012为Windows 8 Store应用程序构建所有源.

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

这篇关于在Windows 8 Metro应用程序中使用旧的C/C ++库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆