Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error version 3.4 #2550

Open
huyuxiang-hub opened this issue May 5, 2024 · 1 comment
Open

compile error version 3.4 #2550

huyuxiang-hub opened this issue May 5, 2024 · 1 comment
Labels
duplicate Issues duplicating another issue Linux Linux specific (any window system)

Comments

@huyuxiang-hub
Copy link

[ 25%] Building C object src/CMakeFiles/glfw.dir/null_monitor.c.o
[ 26%] Building C object src/CMakeFiles/glfw.dir/null_window.c.o
[ 27%] Building C object src/CMakeFiles/glfw.dir/null_joystick.c.o
[ 27%] Building C object src/CMakeFiles/glfw.dir/posix_module.c.o
[ 28%] Building C object src/CMakeFiles/glfw.dir/posix_time.c.o
/home/ihep/intro_OpenGL/glfw-3.4/src/posix_time.c: In function ‘_glfwPlatformInitTimer’:
/home/ihep/intro_OpenGL/glfw-3.4/src/posix_time.c:42:31: error: ‘CLOCK_REALTIME’ undeclared (first use in this function)
42 | _glfw.timer.posix.clock = CLOCK_REALTIME;
| ^~~~~~~~~~~~~~
/home/ihep/intro_OpenGL/glfw-3.4/src/posix_time.c:42:31: note: each undeclared identifier is reported only once for each function it appears in
/home/ihep/intro_OpenGL/glfw-3.4/src/posix_time.c:47:9: warning: implicit declaration of function ‘clock_gettime’ [-Wimplicit-function-declaration]
47 | if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
| ^~~~~~~~~~~~~
/home/ihep/intro_OpenGL/glfw-3.4/src/posix_time.c:47:23: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function)
47 | if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
| ^~~~~~~~~~~~~~~
gmake[2]: *** [src/CMakeFiles/glfw.dir/posix_time.c.o] Error 1
gmake[1]: *** [src/CMakeFiles/glfw.dir/all] Error 2
gmake: *** [all] Error 2

@dougbinks dougbinks added Linux Linux specific (any window system) duplicate Issues duplicating another issue labels Jun 1, 2024
@dougbinks
Copy link
Contributor

See issue #2139 which also has a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues duplicating another issue Linux Linux specific (any window system)
Projects
None yet
Development

No branches or pull requests

2 participants