video | code |
---|---|
https://www.youtube.com/watch?v=4O0_-1NaWnY,https://www.bilibili.com/video/BV1oj411p7qM/? | https://github.com/jdah/minecraft-weekend |
MAKE
git clone --recurse-submodules https://github.com/jdah/minecraft-weekend.git
正克隆到 'minecraft-weekend'...
remote: Enumerating objects: 965, done.
remote: Counting objects: 100% (81/81), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 965 (delta 67), reused 64 (delta 64), pack-reused 884
接收对象中: 100% (965/965), 7.61 MiB | 675.00 KiB/s, 完成.
处理 delta 中: 100% (596/596), 完成.
子模组 'lib/cglm'(https://github.com/recp/cglm.git)已对路径 'lib/cglm' 注册
子模组 'lib/glfw'(https://github.com/glfw/glfw.git)已对路径 'lib/glfw' 注册
正克隆到 '/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm'...
remote: Enumerating objects: 9611, done.
remote: Counting objects: 100% (2162/2162), done.
remote: Compressing objects: 100% (352/352), done.
remote: Total 9611 (delta 1884), reused 1920 (delta 1810), pack-reused 7449
接收对象中: 100% (9611/9611), 2.23 MiB | 381.00 KiB/s, 完成.
处理 delta 中: 100% (6572/6572), 完成.
正克隆到 '/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw'...
remote: Enumerating objects: 31288, done.
remote: Counting objects: 100% (401/401), done.
remote: Compressing objects: 100% (166/166), done.
remote: Total 31288 (delta 259), reused 328 (delta 224), pack-reused 30887
接收对象中: 100% (31288/31288), 15.99 MiB | 707.00 KiB/s, 完成.
处理 delta 中: 100% (22094/22094), 完成.
子模组路径 'lib/cglm':检出 'c783c4210152522ef61f40863f7c91f74186cb2a'
子模组路径 'lib/glfw':检出 '0b9e48fa3df9c184ff1abfb2452fd1a4b696ecd8'
cd minecraft-weekend/
make
// 在运行make命令时没有指定目标名称,默认情况下,make将执行第一个出现的目标。在给定的Makefile中,第一个目标是all,它将执行all目标,会构建目标dirs、libs和game。还可以通过设置.DEFAULT_GOAL的值改变默认行为。
mkdir -p ./bin
cd lib/cglm && cmake . -DCGLM_STATIC=ON && make
-- The C compiler identification is GNU 9.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Setting build type to 'Release' as none was specified.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pdd/MINECRAFT/minecraft-weekend/lib/cglm
make[1]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
make[2]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
[ 4%] Building C object CMakeFiles/cglm.dir/src/euler.c.o
[ 9%] Building C object CMakeFiles/cglm.dir/src/affine.c.o
[ 13%] Building C object CMakeFiles/cglm.dir/src/io.c.o
[ 18%] Building C object CMakeFiles/cglm.dir/src/quat.c.o
[ 22%] Building C object CMakeFiles/cglm.dir/src/cam.c.o
[ 27%] Building C object CMakeFiles/cglm.dir/src/vec2.c.o
[ 31%] Building C object CMakeFiles/cglm.dir/src/vec3.c.o
[ 36%] Building C object CMakeFiles/cglm.dir/src/vec4.c.o
[ 40%] Building C object CMakeFiles/cglm.dir/src/mat2.c.o
[ 45%] Building C object CMakeFiles/cglm.dir/src/mat3.c.o
[ 50%] Building C object CMakeFiles/cglm.dir/src/mat4.c.o
[ 54%] Building C object CMakeFiles/cglm.dir/src/plane.c.o
[ 59%] Building C object CMakeFiles/cglm.dir/src/frustum.c.o
[ 63%] Building C object CMakeFiles/cglm.dir/src/box.c.o
[ 68%] Building C object CMakeFiles/cglm.dir/src/project.c.o
[ 72%] Building C object CMakeFiles/cglm.dir/src/sphere.c.o
[ 77%] Building C object CMakeFiles/cglm.dir/src/ease.c.o
[ 81%] Building C object CMakeFiles/cglm.dir/src/curve.c.o
[ 86%] Building C object CMakeFiles/cglm.dir/src/bezier.c.o
[ 90%] Building C object CMakeFiles/cglm.dir/src/ray.c.o
[ 95%] Building C object CMakeFiles/cglm.dir/src/affine2d.c.o
[100%] Linking C static library libcglm.a
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
[100%] Built target cglm
make[2]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
make[1]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
cd lib/glad && clang -o src/glad.o -Iinclude -c src/glad.c
/bin/sh: 1: clang: not found
make: *** [Makefile:29:libs] 错误 127
CC = gcc
这个错误表明系统中找不到 clang
编译器,导致在构建 lib/glad
目录下的代码时出错。为了解决这个问题,你可以采取以下几个步骤:
-
安装 clang 编译器: 在终端中执行以下命令安装 clang 编译器。
sudo apt-get update sudo apt-get install clang
如果你使用的是不同的 Linux 发行版,请使用相应的包管理器安装 clang。
-
尝试重新运行 make 命令: 安装了 clang 编译器后,再次运行你的
make
命令,看是否问题已经解决。
如果你在步骤1中安装了 clang 但问题仍然存在,可能是因为系统没有正确配置 clang 的符号链接。在这种情况下,你可能需要手动设置 clang 的符号链接。你可以执行以下命令:
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100
sudo update-alternatives --config cc
sudo update-alternatives --config c++
上述命令将 cc
和 c++
的符号链接设置为 clang 编译器。在执行完上述步骤后,尝试重新运行你的 make
命令。
如果问题仍然存在,还可以检查 Makefile 文件,确保其中的编译器设置正确,即确保在编译过程中使用的是正确的编译器。
(base) pdd@pdd-Dell-G15-5511:~/MINECRAFT/minecraft-weekend$ vim Makefile
(base) pdd@pdd-Dell-G15-5511:~/MINECRAFT/minecraft-weekend$ make
mkdir -p ./bin
cd lib/cglm && cmake . -DCGLM_STATIC=ON && make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pdd/MINECRAFT/minecraft-weekend/lib/cglm
make[1]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
make[2]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
Consolidate compiler generated dependencies of target cglm
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
[100%] Built target cglm
make[2]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
make[1]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/cglm”
cd lib/glad && gcc -o src/glad.o -Iinclude -c src/glad.c
cd lib/glfw && cmake . && make
-- The C compiler identification is GNU 9.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Using X11 for window creation
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pdd/MINECRAFT/minecraft-weekend/lib/glfw
make[1]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[2]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 1%] Building C object src/CMakeFiles/glfw.dir/context.c.o
[ 2%] Building C object src/CMakeFiles/glfw.dir/init.c.o
[ 3%] Building C object src/CMakeFiles/glfw.dir/input.c.o
[ 4%] Building C object src/CMakeFiles/glfw.dir/monitor.c.o
[ 5%] Building C object src/CMakeFiles/glfw.dir/vulkan.c.o
[ 5%] Building C object src/CMakeFiles/glfw.dir/window.c.o
[ 6%] Building C object src/CMakeFiles/glfw.dir/x11_init.c.o
[ 7%] Building C object src/CMakeFiles/glfw.dir/x11_monitor.c.o
[ 8%] Building C object src/CMakeFiles/glfw.dir/x11_window.c.o
[ 9%] Building C object src/CMakeFiles/glfw.dir/xkb_unicode.c.o
[ 10%] Building C object src/CMakeFiles/glfw.dir/posix_time.c.o
[ 11%] Building C object src/CMakeFiles/glfw.dir/posix_thread.c.o
[ 11%] Building C object src/CMakeFiles/glfw.dir/glx_context.c.o
[ 12%] Building C object src/CMakeFiles/glfw.dir/egl_context.c.o
[ 13%] Building C object src/CMakeFiles/glfw.dir/osmesa_context.c.o
[ 14%] Building C object src/CMakeFiles/glfw.dir/linux_joystick.c.o
[ 15%] Linking C static library libglfw3.a
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 15%] Built target glfw
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 15%] Building C object examples/CMakeFiles/boing.dir/boing.c.o
[ 16%] Building C object examples/CMakeFiles/boing.dir/__/deps/glad_gl.c.o
[ 17%] Linking C executable boing
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 17%] Built target boing
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 17%] Building C object examples/CMakeFiles/gears.dir/gears.c.o
[ 18%] Building C object examples/CMakeFiles/gears.dir/__/deps/glad_gl.c.o
[ 19%] Linking C executable gears
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 19%] Built target gears
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 20%] Building C object examples/CMakeFiles/heightmap.dir/heightmap.c.o
[ 21%] Building C object examples/CMakeFiles/heightmap.dir/__/deps/glad_gl.c.o
[ 22%] Linking C executable heightmap
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 22%] Built target heightmap
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 23%] Building C object examples/CMakeFiles/offscreen.dir/offscreen.c.o
[ 23%] Building C object examples/CMakeFiles/offscreen.dir/__/deps/glad_gl.c.o
[ 24%] Linking C executable offscreen
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 24%] Built target offscreen
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 25%] Building C object examples/CMakeFiles/particles.dir/particles.c.o
[ 26%] Building C object examples/CMakeFiles/particles.dir/__/deps/tinycthread.c.o
[ 27%] Building C object examples/CMakeFiles/particles.dir/__/deps/getopt.c.o
[ 28%] Building C object examples/CMakeFiles/particles.dir/__/deps/glad_gl.c.o
[ 29%] Linking C executable particles
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 29%] Built target particles
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 30%] Building C object examples/CMakeFiles/sharing.dir/sharing.c.o
[ 31%] Building C object examples/CMakeFiles/sharing.dir/__/deps/glad_gl.c.o
[ 32%] Linking C executable sharing
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 32%] Built target sharing
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 33%] Building C object examples/CMakeFiles/splitview.dir/splitview.c.o
[ 34%] Building C object examples/CMakeFiles/splitview.dir/__/deps/glad_gl.c.o
[ 34%] Linking C executable splitview
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 34%] Built target splitview
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 34%] Building C object examples/CMakeFiles/triangle-opengl.dir/triangle-opengl.c.o
[ 35%] Building C object examples/CMakeFiles/triangle-opengl.dir/__/deps/glad_gl.c.o
[ 36%] Linking C executable triangle-opengl
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 36%] Built target triangle-opengl
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 37%] Building C object examples/CMakeFiles/wave.dir/wave.c.o
[ 37%] Building C object examples/CMakeFiles/wave.dir/__/deps/glad_gl.c.o
[ 38%] Linking C executable wave
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 38%] Built target wave
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 39%] Building C object examples/CMakeFiles/windows.dir/windows.c.o
[ 40%] Building C object examples/CMakeFiles/windows.dir/__/deps/glad_gl.c.o
[ 41%] Linking C executable windows
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 41%] Built target windows
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 42%] Building C object tests/CMakeFiles/clipboard.dir/clipboard.c.o
[ 43%] Building C object tests/CMakeFiles/clipboard.dir/__/deps/getopt.c.o
[ 44%] Building C object tests/CMakeFiles/clipboard.dir/__/deps/glad_gl.c.o
[ 45%] Linking C executable clipboard
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 45%] Built target clipboard
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 45%] Building C object tests/CMakeFiles/events.dir/events.c.o
[ 46%] Building C object tests/CMakeFiles/events.dir/__/deps/getopt.c.o
[ 47%] Building C object tests/CMakeFiles/events.dir/__/deps/glad_gl.c.o
[ 48%] Linking C executable events
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 48%] Built target events
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 49%] Building C object tests/CMakeFiles/msaa.dir/msaa.c.o
[ 50%] Building C object tests/CMakeFiles/msaa.dir/__/deps/getopt.c.o
[ 51%] Building C object tests/CMakeFiles/msaa.dir/__/deps/glad_gl.c.o
[ 52%] Linking C executable msaa
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 52%] Built target msaa
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 53%] Building C object tests/CMakeFiles/glfwinfo.dir/glfwinfo.c.o
[ 54%] Building C object tests/CMakeFiles/glfwinfo.dir/__/deps/getopt.c.o
[ 54%] Building C object tests/CMakeFiles/glfwinfo.dir/__/deps/glad_gl.c.o
[ 55%] Building C object tests/CMakeFiles/glfwinfo.dir/__/deps/glad_vulkan.c.o
[ 56%] Linking C executable glfwinfo
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 56%] Built target glfwinfo
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 57%] Building C object tests/CMakeFiles/iconify.dir/iconify.c.o
[ 58%] Building C object tests/CMakeFiles/iconify.dir/__/deps/getopt.c.o
[ 59%] Building C object tests/CMakeFiles/iconify.dir/__/deps/glad_gl.c.o
[ 60%] Linking C executable iconify
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 60%] Built target iconify
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 61%] Building C object tests/CMakeFiles/monitors.dir/monitors.c.o
[ 62%] Building C object tests/CMakeFiles/monitors.dir/__/deps/getopt.c.o
[ 62%] Building C object tests/CMakeFiles/monitors.dir/__/deps/glad_gl.c.o
[ 63%] Linking C executable monitors
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 63%] Built target monitors
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 63%] Building C object tests/CMakeFiles/reopen.dir/reopen.c.o
[ 64%] Building C object tests/CMakeFiles/reopen.dir/__/deps/glad_gl.c.o
[ 65%] Linking C executable reopen
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 65%] Built target reopen
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 65%] Building C object tests/CMakeFiles/cursor.dir/cursor.c.o
[ 66%] Building C object tests/CMakeFiles/cursor.dir/__/deps/glad_gl.c.o
[ 67%] Linking C executable cursor
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 67%] Built target cursor
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 68%] Building C object tests/CMakeFiles/empty.dir/empty.c.o
[ 69%] Building C object tests/CMakeFiles/empty.dir/__/deps/tinycthread.c.o
[ 70%] Building C object tests/CMakeFiles/empty.dir/__/deps/glad_gl.c.o
[ 71%] Linking C executable empty
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 71%] Built target empty
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 72%] Building C object tests/CMakeFiles/gamma.dir/gamma.c.o
[ 73%] Building C object tests/CMakeFiles/gamma.dir/__/deps/glad_gl.c.o
[ 74%] Linking C executable gamma
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 74%] Built target gamma
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 75%] Building C object tests/CMakeFiles/icon.dir/icon.c.o
[ 75%] Building C object tests/CMakeFiles/icon.dir/__/deps/glad_gl.c.o
[ 76%] Linking C executable icon
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 76%] Built target icon
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 77%] Building C object tests/CMakeFiles/inputlag.dir/inputlag.c.o
[ 78%] Building C object tests/CMakeFiles/inputlag.dir/__/deps/getopt.c.o
[ 78%] Building C object tests/CMakeFiles/inputlag.dir/__/deps/glad_gl.c.o
[ 79%] Linking C executable inputlag
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 79%] Built target inputlag
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 80%] Building C object tests/CMakeFiles/joysticks.dir/joysticks.c.o
[ 81%] Building C object tests/CMakeFiles/joysticks.dir/__/deps/glad_gl.c.o
[ 82%] Linking C executable joysticks
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 82%] Built target joysticks
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 83%] Building C object tests/CMakeFiles/tearing.dir/tearing.c.o
[ 84%] Building C object tests/CMakeFiles/tearing.dir/__/deps/glad_gl.c.o
[ 85%] Linking C executable tearing
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 85%] Built target tearing
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 86%] Building C object tests/CMakeFiles/threads.dir/threads.c.o
[ 87%] Building C object tests/CMakeFiles/threads.dir/__/deps/tinycthread.c.o
[ 88%] Building C object tests/CMakeFiles/threads.dir/__/deps/glad_gl.c.o
[ 88%] Linking C executable threads
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 88%] Built target threads
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 89%] Building C object tests/CMakeFiles/timeout.dir/timeout.c.o
[ 90%] Building C object tests/CMakeFiles/timeout.dir/__/deps/glad_gl.c.o
[ 91%] Linking C executable timeout
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 91%] Built target timeout
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 92%] Building C object tests/CMakeFiles/title.dir/title.c.o
[ 93%] Building C object tests/CMakeFiles/title.dir/__/deps/glad_gl.c.o
[ 94%] Linking C executable title
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 94%] Built target title
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 95%] Building C object tests/CMakeFiles/triangle-vulkan.dir/triangle-vulkan.c.o
[ 96%] Building C object tests/CMakeFiles/triangle-vulkan.dir/__/deps/glad_vulkan.c.o
[ 97%] Linking C executable triangle-vulkan
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 97%] Built target triangle-vulkan
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[3]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[ 98%] Building C object tests/CMakeFiles/window.dir/window.c.o
[ 99%] Building C object tests/CMakeFiles/window.dir/__/deps/glad_gl.c.o
[100%] Linking C executable window
make[3]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
[100%] Built target window
make[2]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
make[1]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/glfw”
cd lib/noise && make
make[1]: 进入目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/noise”
gcc -o noise1234.o noise1234.c -c
ar rcs libnoise.a noise1234.o
make[1]: 离开目录“/home/pdd/MINECRAFT/minecraft-weekend/lib/noise”
gcc -o src/block/air.o -c src/block/air.c -std=c11 -O3 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing -Wno-pointer-arith -Wno-newline-eof -Wno-unused-parameter -Wno-gnu-statement-expression -Wno-gnu-compound-literal-initializer -Wno-gnu-zero-variadic-macro-arguments -Ilib/cglm/include -Ilib/glad/include -Ilib/glfw/include -Ilib/stb -Ilib/noise -fbracket-depth=1024
gcc: error: unrecognized command line option ‘-fbracket-depth=1024’
make: *** [Makefile:43:src/block/air.o] 错误 1
src/world/gen/../../util/fmath.h:52:14: note: in expansion of macro ‘min’
52 | max(_mn, min(_mx, _x)); })
| ^~~
src/world/gen/worldgen.c:340:9: note: in expansion of macro ‘clamp’
340 | clamp((_x), 0, CHUNK_SIZE.x - 1) * CHUNK_SIZE.x +\
| ^~~~~
src/world/gen/worldgen.c:352:17: note: in expansion of macro ‘WG_GET_H’
352 | WG_GET_H(x, z).h = v;
| ^~~~~~~~
src/world/gen/../../util/fmath.h:43:19: warning: ISO C forbids braced-groups within expressions [-Wpedantic]
43 | #define min(a, b) ({\
| ^
src/world/gen/../../util/fmath.h:40:26: note: in definition of macro ‘max’
40 | __typeof__ (b) _b = (b); \
| ^
src/world/gen/../../util/fmath.h:52:14: note: in expansion of macro ‘min’
52 | max(_mn, min(_mx, _x)); })
| ^~~
src/world/gen/worldgen.c:340:9: note: in expansion of macro ‘clamp’
340 | clamp((_x), 0, CHUNK_SIZE.x - 1) * CHUNK_SIZE.x +\
| ^~~~~
src/world/gen/worldgen.c:352:17: note: in expansion of macro ‘WG_GET_H’
352 | WG_GET_H(x, z).h = v;
| ^~~~~~~~
src/world/gen/../../util/fmath.h:38:19: warning: ISO C forbids braced-groups within expressions [-Wpedantic]
38 | #define max(a, b) ({\
| ^
src/world/gen/../../util/fmath.h:52:5: note: in expansion of macro ‘max’
52 | max(_mn, min(_mx, _x)); })
| ^~~
src/world/gen/worldgen.c:340:9: note: in expansion of macro ‘clamp’
340 | clamp((_x), 0, CHUNK_SIZE.x - 1) * CHUNK_SIZE.x +\
| ^~~~~
src/world/gen/worldgen.c:352:17: note: in expansion of macro ‘WG_GET_H’
352 | WG_GET_H(x, z).h = v;
| ^~~~~~~~
src/world/gen/../../util/fmath.h:48:26: warning: ISO C forbids braced-groups within expressions [-Wpedantic]
48 | #define clamp(x, mn, mx) ({\
| ^
src/world/gen/worldgen.c:340:9: note: in expansion of macro ‘clamp’
340 | clamp((_x), 0, CHUNK_SIZE.x - 1) * CHUNK_SIZE.x +\
| ^~~~~
src/world/gen/worldgen.c:352:17: note: in expansion of macro ‘WG_GET_H’
352 | WG_GET_H(x, z).h = v;
| ^~~~~~~~
src/world/gen/../../util/fmath.h:43:19: warning: ISO C forbids braced-groups within expressions [-Wpedantic]
43 | #define min(a, b) ({\
| ^
src/world/gen/../../util/fmath.h:40:17: note: in definition of macro ‘max’
40 | __typeof__ (b) _b = (b); \
| ^
src/world/gen/../../util/fmath.h:52:14: note: in expansion of macro ‘min’
52 | max(_mn, min(_mx, _x)); })
| ^~~
src/world/gen/worldgen.c:341:9: note: in expansion of macro ‘clamp’
341 | clamp((_z), 0, CHUNK_SIZE.z - 1)]
| ^~~~~
src/world/gen/worldgen.c:352:17: note: in expansion of macro ‘WG_GET_H’
352 | WG_GET_H(x, z).h = v;
| ^~~~~~~~
src/world/gen/../../util/fmath.h:43:19: warning: ISO C forbids braced-groups within expressions [-Wpedantic]
43 | #define min(a, b) ({\
| ^
src/world/gen/../../util/fmath.h:40:26: note: in definition of macro ‘max’
40 | __typeof__ (b) _b = (b); \
| ^
src/world/gen/../../util/fmath.h:52:14: note: in expansion of macro ‘min’
52 | max(_mn, min(_mx, _x)); })
| ^~~
src/world/gen/worldgen.c:341:9: note: in expansion of macro ‘clamp’
341 | clamp((_z), 0, CHUNK_SIZE.z - 1)]
| ^~~~~
src/world/gen/worldgen.c:352:17: note: in expansion of macro ‘WG_GET_H’
352 | WG_GET_H(x, z).h = v;
| ^~~~~~~~
src/world/gen/../../util/fmath.h:38:19: warning: ISO C forbids braced-groups within expressions [-Wpedantic]
38 | #define max(a, b) ({\
| ^
src/world/gen/../../util/fmath.h:52:5: note: in expansion of macro ‘max’
52 | max(_mn, min(_mx, _x)); })
| ^~~
src/world/gen/worldgen.c:341:9: note: in expansion of macro ‘clamp’
341 | clamp((_z), 0, CHUNK_SIZE.z - 1)]
| ^~~~~
src/world/gen/worldgen.c:352:17: note: in expansion of macro ‘WG_GET_H’
352 | WG_GET_H(x, z).h = v;
| ^~~~~~~~
src/world/gen/../../util/fmath.h:48:26: warning: ISO C forbids braced-groups within expressions [-Wpedantic]
48 | #define clamp(x, mn, mx) ({\
| ^
src/world/gen/worldgen.c:341:9: note: in expansion of macro ‘clamp’
341 | clamp((_z), 0, CHUNK_SIZE.z - 1)]
| ^~~~~
src/world/gen/worldgen.c:352:17: note: in expansion of macro ‘WG_GET_H’
352 | WG_GET_H(x, z).h = v;
| ^~~~~~~~
src/world/gen/worldgen.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-gnu-zero-variadic-macro-arguments’
cc1: warning: unrecognized command line option ‘-Wno-gnu-compound-literal-initializer’
cc1: warning: unrecognized command line option ‘-Wno-gnu-statement-expression’
cc1: warning: unrecognized command line option ‘-Wno-newline-eof’
gcc -o bin/game src/block/air.o src/block/block.o src/block/buttercup.o src/block/clay.o src/block/coal.o src/block/cobblestone.o src/block/copper.o src/block/dirt.o src/block/glass.o src/block/grass.o src/block/gravel.o src/block/lava.o src/block/leaves.o src/block/log.o src/block/pineleaves.o src/block/pinelog.o src/block/planks.o src/block/podzol.o src/block/rose.o src/block/sand.o src/block/shrub.o src/block/snow.o src/block/stone.o src/block/tallgrass.o src/block/torch.o src/block/water.o src/entity/c_blocklook.o src/entity/c_camera.o src/entity/c_control.o src/entity/c_debug.o src/entity/c_light.o src/entity/c_movement.o src/entity/c_physics.o src/entity/c_position.o src/entity/ecs.o src/entity/player.o src/gfx/blockatlas.o src/gfx/renderer.o src/gfx/shader.o src/gfx/texture.o src/gfx/vao.o src/gfx/vbo.o src/gfx/window.o src/ui/crosshair.o src/ui/hotbar.o src/ui/ui.o src/util/camera.o src/util/color.o src/util/direction.o src/util/fmath.o src/world/blockmesh.o src/world/chunk.o src/world/chunkmesh.o src/world/light.o src/world/sky.o src/world/world.o src/main.o src/world/gen/flowergen.o src/world/gen/grassgen.o src/world/gen/noise.o src/world/gen/shrubgen.o src/world/gen/treegen.o src/world/gen/worldgen.o lib/glad/src/glad.o lib/cglm/libcglm.a lib/glfw/src/libglfw3.a lib/noise/libnoise.a -lm -ldl -lpthread
(base) pdd@pdd-Dell-G15-5511:~/MINECRAFT/minecraft-weekend$ ls
bin lib LICENSE Makefile README.md res screenshots src
(base) pdd@pdd-Dell-G15-5511:~/MINECRAFT/minecraft-weekend$ cd bin
(base) pdd@pdd-Dell-G15-5511:~/MINECRAFT/minecraft-weekend/bin$ ls
game
(base) pdd@pdd-Dell-G15-5511:~/MINECRAFT/minecraft-weekend/bin$ ./game
error loading shader at res/shaders/basic_texture.vs
(base) pdd@pdd-Dell-G15-5511:~/MINECRAFT/minecraft-weekend$ ./bin/game