c++ - 添加了 SDL 库:使用 VS 构建时“GNUC 未定义为预处理器宏”
问题描述
我创建了一个使用 SDL 库的 UE4 插件。但是,当我尝试使用
#include "SDL.h"
我收到此错误:
Error C4668 '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
这些错误指向两个文件:SDL_assert.h 和 begin_code.h - 这两个文件都来自 SDL 库。
我认为它与编译器有关,这是 begin_code.h 第 37 行的一段代码(实际错误行):
# if (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */
我不认为 VS 使用 gcc 来编译,这可能是问题所在。知道如何解决这个问题吗?
解决方案
推荐阅读
- android - 更改底部导航视图的图标大小但图标覆盖文本?
- node.js - 使用 multer 和 Node.js 将多个文件上传到 Google Cloud
- html - css 计数器重置:不在 Firefox 中工作?
- python - Python中复杂信号的量化
- python - request.param 如何在间接参数化中注解?
- flutter - 修复这个颤动的 CHATVIEW 问题。我似乎无法克服它好几天
- xcode - 如何在同一通道中为两个不同的类别添加“excludeCategoryMask”?
- laravel - Laravel 访问组件类中的属性和插槽
- social-media - 将照片中的人物和项目标记为叠加
- angularjs - ng-click 如何调用 ng-directive 函数