如何在VS2010中设置_ITERATOR_DEBUG_LEVEL?
我们正在使用另一个供应商提供的库,该库显然是使用错误的标志进行编译的,即 32 位调试模式下的 _ITERATOR_DEBUG_LEVEL = 0。虽然我已经向他们提交了错误报告,但我需要一个中间解决方案。我们自己不使用 stl,所以我可以自由地为使用所述库的子项目更改此标志。但我不知道该怎么做。我尝试的方法不起作用:
/D_ITERATOR_DEBUG_LEVEL=0
> LINK : warning LNK4044: unrecognized option '/D_ITERATOR_DEBUG_LEVEL=0'; ignored
#define _ITERATOR_DEBUG_LEVEL 0
> Nothing happens
What's thepropersyntax or option to get the project to compile without Checked Iterators?
We are using a library by another vendor, which apparently was compiled with the wrong flags, namely _ITERATOR_DEBUG_LEVEL = 0 in 32bit-Debug-mode. While I have already filed a bug report with them, I need an intermediate solution. We do not use stl ourselves, so I am free to change this flag for the subproject that uses said library. But I cannot figure out how to do so. What I tried an didn't work:
/D_ITERATOR_DEBUG_LEVEL=0
> LINK : warning LNK4044: unrecognized option '/D_ITERATOR_DEBUG_LEVEL=0'; ignored
#define _ITERATOR_DEBUG_LEVEL 0
> Nothing happens
What's the proper syntax or option to get the project to compile without checked iterators?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
找到了解决方案。
项目页面/配置属性/C、C++/预处理器/预处理器定义。
添加“_ITERATOR_DEBUG_LEVEL = 0”在那里工作。
Found the solution.
Project Pages / Configuration Properties / C,C++ / Preprocessor / Preprocessor Definitions.
Add "_ITERATOR_DEBUG_LEVEL=0" in there worked.
正如附加信息一样:
项目页面/配置属性/C,C++/预处理器/预处理器定义,并根据目标将预处理器宏 _ITERATOR_DEBUG_LEVEL 设置为以下之一:
Just as additional information :
Project Pages / Configuration Properties / C,C++ / Preprocessor / Preprocessor Definitions and set the preprocessor macro _ITERATOR_DEBUG_LEVEL to one of the following depending on the target :
微软的这篇文章帮助我解决了这个问题:
https:// learn.microsoft.com/cpp/standard-library/iterator-debug-level
有一个编译器开关可以在 Visual Studio 2022 中设置该值:
/D_ITERATOR_DEBUG_LEVEL=0
This article from Microsoft helped me, to solve the issue:
https://learn.microsoft.com/cpp/standard-library/iterator-debug-level
There is a compiler switch to set the value in Visual Studio 2022:
/D_ITERATOR_DEBUG_LEVEL=0