Visual Studio 错误 D8016:“/ZI"和“/Gy"命令行选项不兼容

2023-09-27C/C++开发问题
1

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

问题描述

我正在处理的项目遇到问题.尽管代码是正确的,但我无法构建它,因为出现以下错误

I am having an issue with a project that I am working on. Despite the fact that the code is right, I can't build it because I got the following error

错误 D8016 '/ZI' 和 '/Gy-' 命令行选项不兼容 LoadReport C:LoadReportLoadReportcl

Error D8016 '/ZI' and '/Gy-' command-line options are incompatible LoadReport C:LoadReportLoadReportcl

我的 Visual Studio 版本是 2015 年.任何想法将不胜感激.

My version of the visual studio is 2015. Any idea would be appreciated.

推荐答案

您选择编辑并继续"(/ZI) 可以在调试期间修复代码,同时也可以禁用功能"- 级别链接"(/Gy-).

You are choosing "Edit and Continue" (/ZI) to be able to fix code during debugging, but also "Disable Function-Level Linking" (/Gy-).

这两者不会一起工作,因为您不能只更改代码中间的一个函数.所以只需选择其中之一,例如将 /Gy- 更改为 /Gy.

Those two will not work together, as you cannot just change one function in the middle of the code. So just choose one of them, like changing /Gy- to /Gy.

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

The End

相关推荐

无法访问 C++ std::set 中对象的非常量成员函数
Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)...
2024-08-14 C/C++开发问题
17

从 lambda 构造 std::function 参数
Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)...
2024-08-14 C/C++开发问题
25

STL BigInt 类实现
STL BigInt class implementation(STL BigInt 类实现)...
2024-08-14 C/C++开发问题
3

使用 std::atomic 和 std::condition_variable 同步不可靠
Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)...
2024-08-14 C/C++开发问题
17

在 STL 中将列表元素移动到末尾
Move list element to the end in STL(在 STL 中将列表元素移动到末尾)...
2024-08-14 C/C++开发问题
9

为什么禁止对存储在 STL 容器中的类重载 operator&()?
Why is overloading operatoramp;() prohibited for classes stored in STL containers?(为什么禁止对存储在 STL 容器中的类重载 operatoramp;()?)...
2024-08-14 C/C++开发问题
6