Visual Studio错误D8016:'/ ZI'和'/ O2'命令行选项不兼容 [英] Visual Studio error D8016: '/ZI' and '/O2' command-line options are incompatible

查看:341
本文介绍了Visual Studio错误D8016:'/ ZI'和'/ O2'命令行选项不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio错误D8016:'/ ZI'和'/ O2'命令行选项不兼容



我第一次使用C ++进行优化。
当我'解决方案'我不断得到这个错误。
在属性页面中,我的配置设置为Release
在project / properties / c ++ / optimization下我尝试了除disable之外的所有选项。
在project / properties / c ++ / General下,我也尝试了Debug Information Format下的所有选项(假设None是一个不错的选择。
我认为它可能与链接器设置有关,但仍然不知道该怎么做。

解决方案

p>转到项目的属性页并更改值:

  C / C ++ |一般|调试信息格式

对于Program Database for Edit and Continue(/ ZI) p>

例如,Program Database(/ Zi)应该可以工作。


Visual Studio error D8016: '/ZI' and '/O2' command-line options are incompatible

I'm using optimization for the first time with C++. When I 'build solution' I keep getting this error. In the property pages, I have configuration set to Release Under project/properties/c++/optimization I tried all the options except for disable. Under project/properties/c++/General I also tried all the options under 'Debug Information Format' (assume 'None' is a good choice?). I think it might have something to do with the linker settings, but still don't know what to do.

解决方案

Go to the project's property page and change the value for:

C/C++ | General | Debug Information Format

To something other than "Program Database for Edit and Continue (/ZI)"

For example, "Program Database (/Zi)" should work.

这篇关于Visual Studio错误D8016:'/ ZI'和'/ O2'命令行选项不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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