在机器人卡罗尔中找不到 SDL/SDL.h 文件

发布于 2025-01-16 21:34:26 字数 1283 浏览 2 评论 0原文

我尝试为我在大学的工作运行这个名为“Karel the Robot”的 Github 存储库: Karel the Robot for MacOS

我使用 macOS Monterey V12.2.1 并通过名为 Clion 的 IDE 运行它。我尝试通过 IDE 的内置 VCS 选项来处理项目,还尝试简单地从桌面下载并打开它。每当我尝试运行基本项目(没有我所做的任何添加或更改)时,我都会收到此错误:

/Library/Developer/CommandLineTools/usr/bin/cc  -I/Users/nox/CLionProjects/karel/include -I/usr/local/include -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.2 -std=gnu11 -MD -MT CMakeFiles/StarterProject.dir/HelloKarel.c.o -MF CMakeFiles/StarterProject.dir/HelloKarel.c.o.d -o CMakeFiles/StarterProject.dir/HelloKarel.c.o -c /Users/nox/CLionProjects/karel/HelloKarel.c
In file included from /Users/nox/CLionProjects/karel/HelloKarel.c:10:
In file included from /Users/nox/CLionProjects/karel/include/karel.h:3:
In file included from /Users/nox/CLionProjects/karel/include/structs.h:48:
/Users/nox/CLionProjects/karel/include/config.h:1:10: fatal error: 'SDL/SDL.h' file not found #include <SDL/SDL.h>

我知道他在我的系统上找不到 SDL.h 文件,因此我通过执行以下操作使用 brew 安装并重新安装了它下列的: brew 安装 sdl sdl_image sdl_ttfbrew reinstall sdl sdl_image sdl_ttf

似乎没有什么对我有用。有人可以帮我解决这个问题吗?

I tried to run this Github repository called 'Karel the Robot' for my work in university:
Karel the Robot for MacOS

I use macOS Monterey V12.2.1 and run this through an IDE called Clion. I tried to work on the projects via the built in VCS option of the IDE and also tried to simply download and open it from the desktop. Whenever I try to run the basic project (without any additions or changes made by me) I get this error:

/Library/Developer/CommandLineTools/usr/bin/cc  -I/Users/nox/CLionProjects/karel/include -I/usr/local/include -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.2 -std=gnu11 -MD -MT CMakeFiles/StarterProject.dir/HelloKarel.c.o -MF CMakeFiles/StarterProject.dir/HelloKarel.c.o.d -o CMakeFiles/StarterProject.dir/HelloKarel.c.o -c /Users/nox/CLionProjects/karel/HelloKarel.c
In file included from /Users/nox/CLionProjects/karel/HelloKarel.c:10:
In file included from /Users/nox/CLionProjects/karel/include/karel.h:3:
In file included from /Users/nox/CLionProjects/karel/include/structs.h:48:
/Users/nox/CLionProjects/karel/include/config.h:1:10: fatal error: 'SDL/SDL.h' file not found #include <SDL/SDL.h>

I understand that he can't find the SDL.h file on my system so I installed and reinstalled it with brew by doing the following:
brew install sdl sdl_image sdl_ttf
and brew reinstall sdl sdl_image sdl_ttf

Nothing seemed to work for me. Can anyone help me with this please?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文