D8048:无法编译C文件'的OpenSSL \ applink.c'与/ ZW选项

编程入门 行业动态 更新时间:2024-10-26 04:28:27
本文介绍了D8048:无法编译C文件'的OpenSSL \ applink.c'与/ ZW选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想使用OpenSSL在我的Metro应用。我创建了一个C ++ WinRTComponent这部分下有OpenSSL的文件

I am trying to use OpenSSL in my metro application. I created a C++ WinRTComponent and have openssl files under this component

然而,当我尝试编译项目,我得到了以下错误:      D8048:无法编译C文件'的OpenSSL \ applink.c'与/ ZW选项

However, when I try to compile the project, I got the following error: D8048: cannot compile C file 'openssl\applink.c' with /ZW option

任何人都可以告诉我,我应该怎么解决这个问题,让我的项目编译?

Anyone can tell me how should I resolve this problem to get my project to compile?

请让我知道如果你需要任何其他信息来帮助我。

Please let me know if you need any other info to help me.

谢谢

推荐答案

该错误消息正是它说,这是 - VC ++不支持C ++ / CX扩展 - 与/ ZW编译器开关激活 - 在编译为C文件(这还挺有道理的,因为这些扩展是面向对象的)。

The error message is exactly what it says it is - VC++ does not support C++/CX extensions - enabled with /ZW compiler switch - in files compiled as C (which kinda makes sense, since those extensions are object-oriented).

为什么你会看到这样做的原因是,默认情况下,在地铁C ++项目中的所有文件都与/ ZW编译。不幸的是,这也适用于.c文件,即使它实际上不为他们工作。你需要的是有选择地禁用扩展名的文件。 >上的文件或者在Solution Explorer中选择文件的属性 - 您可以通过右键单击做到这一点。在属性页对话框,定位到C / C ++ - >常规,寻找启用Windows运行时扩展

The reason why you're seeing this is that, by default, all files in a Metro C++ project are compiled with /ZW. Unfortunately, this also applies to .c files, even though it doesn't actually work for them. What you need is to disable the extensions selectively for those files. You can do so via right-click -> Properties on a file or a selection of files in Solution Explorer. In the Property Pages dialog, navigate to C/C++ -> General, and look for "Enable Windows Run Time Extensions".

更多推荐

D8048:无法编译C文件'的OpenSSL \ applink.c'与/ ZW选项

本文发布于:2023-11-10 06:36:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1574627.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:选项   文件   ZW   applink   OpenSSL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!