V version: 0.1.21 7680d9a
OS: Ubuntu 18.04.3 LTS
What did you do?
I did run v -g tetris.v while being inside examples/tetris/ directory.
What did you expect to see?
Expected to get build success.
What did you see instead?
C compiler=cc
all .v files:
["/home/code2be/v/vlib/builtin/array.v", "/home/code2be/v/vlib/builtin/builtin.v", "/home/code2be/v/vlib/builtin/float.v", "/home/code2be/v/vlib/builtin/hashmap.v", "/home/code2be/v/vlib/builtin/int.v", "/home/code2be/v/vlib/builtin/map.v", "/home/code2be/v/vlib/builtin/option.v", "/home/code2be/v/vlib/builtin/string.v", "/home/code2be/v/vlib/builtin/utf8.v", "/home/code2be/v/vlib/gx/gx.v", "/home/code2be/v/vlib/gl/1shader.v", "/home/code2be/v/vlib/gl/gl.v", "/home/code2be/v/vlib/strings/builder_c.v", "/home/code2be/v/vlib/strings/similarity.v", "/home/code2be/v/vlib/strings/strings.v", "/home/code2be/v/vlib/strconv/atoi.v", "/home/code2be/v/vlib/rand/pcg32.v", "/home/code2be/v/vlib/rand/rand.v", "/home/code2be/v/vlib/rand/splitmix64.v", "/home/code2be/v/vlib/math/bits.v", "/home/code2be/v/vlib/math/const.v", "/home/code2be/v/vlib/math/math.v", "/home/code2be/v/vlib/math/unsafe.v", "/home/code2be/v/vlib/os/const.v", "/home/code2be/v/vlib/os/os.v", "/home/code2be/v/vlib/os/os_nix.v", "/home/code2be/v/vlib/stbi/stbi.v", "/home/code2be/v/vlib/glfw/glfw.v", "/home/code2be/v/vlib/glm/glm.v", "/home/code2be/v/vlib/time/time.v", "/home/code2be/v/vlib/gg/gg.v", "/home/code2be/v/vlib/freetype/freetype.v", "tetris.v"]
In file included from /home/code2be/v/examples/tetris/tetris.v:431:
In file included from /home/code2be/v/thirdparty/glfw/GLFW/glfw3.h:202:
/home/code2be/v/thirdparty/glfw/GLFW/glfw3.h:202: error: include file 'GL/gl.h' not found
V error: C error. This should never happen. Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose
Hi @code2be , have you tried the solutions found in #2410?
@nedpals Thank you, that resolved the issue, although I think the V error part should be modified ? as it made me think about what happened as something I shouldn't try to fix, and have to report as bug, although it is not related to V anyhow, it is just a matter of missing libraries !.
The issue is that this is only discovered after compiling.
The same issue appears on Fedora 31.
The solution to include GL/gl.h is:
sudo dnf install mesa-libGL-devel
Most helpful comment
Hi @code2be , have you tried the solutions found in #2410?