collection.h [英] collection.h

查看:406
本文介绍了collection.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我们正在将一些代码移植到VS2015(更新3)。这使用了2015年库中的collection.h。


collection.h有以下行


"


#ifndef







__ cplusplus_winrt



   





#error collection.h需要/ ZW编译器
选项。





#endif


"


我们使用的一些图书馆已经编译过了  / MT和/ Mtd(静态链接到CRT)。这与/ Zw不兼容。


我可以检查是否有相同的解决方法?在线支持有一篇关于MSDN社交的文章,但看起来作者改变了VS2012版本,问题就消失了。我将不胜感激任何建议。我们使用VS2015专业版,
更新3。




谢谢,


Sonia。





SS

解决方案

首先,您确定要将应用更改为UWP应用吗?   collection.h适用于将WinRT集合投影到C ++中。  如果您没有编写UWP应用程序(或至少是Windows 8.x商店应用程序),那么您根本不想使用
路线。


假设您确实想要一个UWP应用程序,那么您需要修复静态链接到CRT的库。


让我们知道您需要去哪个方向,也许我们可以提供更多建议。


Hi,

We are porting some code into VS2015 (update 3). This uses collection.h which is in the 2015 library.

collection.h has the following line

"

#ifndef

__cplusplus_winrt

   

#errorcollection.h requires the /ZW compiler option.


#endif

"

Some of the libraries we use are compiled  with /MT and /Mtd (statically linking to CRT). This is not compatible with /Zw.

Could I check if there is a workaround for the same? Online support has one article on MSDN social but it looks like the author changed the VS2012 edition and the issue went away. I would appreciate any suggestions. We are using VS2015 Professional with update 3.

Thanks,

Sonia.


SS

解决方案

First of all, are you certain you want to change your app to a UWP app?  collection.h applies to projecting WinRT collections into C++.  If you aren't writing a UWP app (or at least a Windows 8.x store app) then you don't want to go that route at all.

Assuming you do want a UWP app, then you need to fix your libraries that are linking statically to the CRT.

Let us know which direction you need to go and perhaps we can give more advice.


这篇关于collection.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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