问题:在库中使用Windows运行时扩展 [英] Question re: consuming the Windows Runtime Extension in a library

查看:675
本文介绍了问题:在库中使用Windows运行时扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力将现有的C ++应用程序移植到Windows Phone,但是在使用某些项目库中的Windows Runtime Extension时遇到了麻烦.

I'm working on porting an existing C++ app to Windows Phone and I'm having trouble consuming the Windows Runtime Extension from some of my projects libraries.

如果我在某些项目中设置了/ZW标志,则最终会出现编译器错误:

If I set the /ZW flag in some of my projects I wind up getting compiler errors:

1> ...文件路径...(793):致命错误C1001:编译器发生内部错误.
1  (编译文件'msc1.cpp',第1443行)
1>  要变通解决此问题,请尝试简化或更改上述位置附近的程序.
1 请在Visual C ++上选择技术支持命令

1>...filepath...(793): fatal error C1001: An internal error has occurred in the compiler.
1>  (compiler file 'msc1.cpp', line 1443)
1>   To work around this problem, try simplifying or changing the program near the locations listed above.
1>  Please choose the Technical Support command on the Visual C++

在线搜索此编译器错误使我进入了Microsoft Connect错误报告,但这并不能真正帮助我解决问题.

Searching for this compiler error online brings me to a Microsoft Connect bug report but it doesn't really help me solve the problem.

我不确定是否可以重写导致编译器错误的模板库,所以我想知道是否只能使用库中某些文件的Windows运行时扩展,而不是整个库.有可能吗?

I'm not sure if I can rewrite the template libraries that are causing the Compiler error, so I'm wondering if I could instead only consume the Windows Runtime Extension from certain files in a library, instead of the whole library. Is that possible?

推荐答案

您可能需要在Windows Phone 8 SDK环境中重新编译C ++库.

It is likely that you need to recompile your C++ libraries in the Windows Phone 8 SDK environment.

以下内容可能与您的问题有关.关于托管代码(不是C ++),如果要从Windows Phone以外的平台移植DLL,则它们必须遵守 便携式类库要求.

The following might be somewhat related to your problem. Regarding managed code (not C++), if you are porting DLLs from a platform other than Windows Phone, they need to adhere to Portable Class Library requirements.

如果可能的话,我个人倾向于避免以这种方式重用DLL.对于这些DLL在所有平台上的测试情况,我可能持怀疑态度.

Personally I would be inclined to avoid reusing DLLs this way if possible; maybe I am a skeptic regarding how well such DLLs have been tested across all platforms.

希望此帮助,
标记

Hope this helps,
Mark 


这篇关于问题:在库中使用Windows运行时扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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