gpt4 book ai didi

c++ - 错误 C1189 #error : The C++ Standard Library forbids macroizing the keyword "inline"

转载 作者:行者123 更新时间:2023-12-04 09:07:19 25 4
gpt4 key购买 nike

我正在将一个项目从 VS 2010 迁移到 VS2019。我的代码在 VS 2010 中运行良好,但我在 VS2019 中遇到相同代码的错误。

#undef inline
#define inline __forceinline

..///
..///code

#undef inline
#define inline inline

Error C1189 #error:C++ 标准库禁止宏化关键字“inline”。启用警告 C4005 以查找禁止定义

我怎样才能消除这个错误。

最佳答案

我通过将 _XKEYCHECK_H 添加到 Properties > C/C++ > Preprocessor > Preprocessor Definitions 来解决它。
引用:here

enter image description here

关于c++ - 错误 C1189 #error : The C++ Standard Library forbids macroizing the keyword "inline",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63418586/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com