You are not logged in.
Pages: 1
I am trying to learn opengl in C, but I have having some issues installing the header file glad/gl.h as shown to include here My program currently is minimal and just has the includes pretty much, and when I try to compile I get this:
main.c:6:10: fatal error: glad/gl.h: No such file or directory
6 | #include <glad/gl.h>
| ^~~~~~~~~~~
compilation terminated.So I am missing the glad/gl.h header file. When I use pkgfile gl.h or pkgfile glad, nothing comes up other than some opengl projects. Not sure how to get this header file... Is this header file even in the arch repo? Thanks in advance!
Last edited by AngelicLolipop (2021-02-28 03:38:21)
Offline
The tutorial you linked seems to rely on https://github.com/Dav1dde/glad (but their link is 502)
Offline
Assuming you installed all the needed packages, you need to set GLPATH=/usr/lib
Add it to your /etc/environment so it's there and reboot
1 #
2 # This file is parsed by pam_env module
3 #
4 # Syntax: simple "KEY=VAL" pairs on separate lines
5 #
6
7 ####LC_ALL=en_US.UTF-8
8 EDITOR=nano
9 _microarchitecture=29
10 CFLAGS="-march=westmere -mtune=westmere -02 -pipe -fno-plt"
11 CXXFLAGS="-march=westmere -mtune=westmere -02 -pipe -fno-plt"
12 MAKEFLAGS="-j2"
13 CONFIG_SECURITY_APPARMOR=y
14 CONFIG_AUDIT=y
15 CONFIG_LSM="lockdown,yama,apparmor,bpf"
16 PATH=/usr/local/cuda-8.0/bin:/usr/local/cuda-8.0/samples/bin/x86_64/linux/r>
17 GLPATH=/usr/lib
18 CUDADIR=/usr/local/cudaYou can also prefix your compile command line like so
GLPATH=/usr/lib gcc ...... Offline
I think I figured it out, I thought that this was in the glfw package, thanks for the help
Offline
This is marked as SOLVED - but no solution is added. That is annoying for people that run into the same problem
.
Offline
You need to install glad, linked in the 2nd post.
This is also kinda implied across the thread (me referencing it and the OP stating that he thought this was provided by glfw)
Offline
Pages: 1