本文共 632 字,大约阅读时间需要 2 分钟。
GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc.
https://github.com/glfw/glfw
git clone https://github.com/glfw/glfw.git
error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
error: ‘M_PI’ undeclared (first use in this function)
需要在 CMakeLists.txt 中添加
add_definitions(-std=gnu99)
cmake -DBUILD_SHARED_LIBS=ON .make
编译结果
./src/libglfw.so.3./src/libglfw.so./src/libglfw.so.3.4
cmake .make
转载地址:http://wwbli.baihongyu.com/