compat.glfw
#includeGLFW windowing and input library built from upstream sources
#include <GLFW/glfw3.h>
mcpp add compat.glfw@3.4
Usage
From this repository's own test project — built and run by CI, not written for the website.
#ifdef __linux__
#include <GLFW/glfw3.h>
int main() {
glfwSetErrorCallback(nullptr);
if (glfwInit()) glfwTerminate(); // tolerant: headless CI has no display
return GLFW_VERSION_MAJOR == 3 ? 0 : 1;
}
#else
int main() { return 0; }
#endif
tests/examples/gui-stack/tests/glfw.cpp · project tests/examples/gui-stack
Build
- targets
glfw (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
include, src
Sources (13)
src/context.csrc/init.csrc/input.csrc/monitor.csrc/platform.csrc/vulkan.csrc/window.csrc/egl_context.csrc/osmesa_context.csrc/null_init.csrc/null_monitor.csrc/null_window.csrc/null_joystick.c