Fatal error: GL/glew.h: No such file or directory

Hi all!

Really struggling here and have searched all over the place but cannot find an answer.

Every time I build a project (or OF examples) on my linux (ubuntu/KDE Neon) I am faced with the following error

libs/openFrameworks/utils/ofConstants.h:181:12: fatal error: GL/glew.h: No such file or directory

I’ve tried to install/reinstall every glew library, I’ve checked the header file is in /usr/include/GL, tried running from the latest OF release… but now I’m stuck!

Any advice would be greatly appreciated :slight_smile:

Thanks in advance!!

are you using OF from github? in that case you need to do some extra steps that are detailed in the INSTALL_FROM_GITHUB.md guide that it’s in the root folder

Hello everyone !
I have the same problem compiling on debian 10 buster.
I downloaded the last release and followed each step of the linux install
https://openframeworks.cc/setup/linux-install/
But when it comes to compiling OF

cd OF/scripts/linux
./compileOF.sh -j3

I get error messages saying file not found

In file included from /home/gordon/miniconda3/x86_64-conda_cos6-linux-gnu/sysroot/usr/include/features.h:356:0,
                 from /home/gordon/miniconda3/x86_64-conda_cos6-linux-gnu/sysroot/usr/include/stdint.h:26,
                 from /home/gordon/miniconda3/lib/gcc/x86_64-conda_cos6-linux-gnu/7.2.0/include/stdint.h:9,
                 from /home/gordon/graphic/openFrameworks/libs/openFrameworks/utils/ofConstants.h:2,
                 from /home/gordon/graphic/openFrameworks/libs/openFrameworks/gl/ofGLUtils.h:10,
                 from /home/gordon/graphic/openFrameworks/libs/openFrameworks/gl/ofGLUtils.cpp:1:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:482:49: error: missing binary operator before token "("
 #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
                                                 ^
In file included from /home/gordon/graphic/openFrameworks/libs/openFrameworks/gl/ofGLUtils.h:10:0,
                 from /home/gordon/graphic/openFrameworks/libs/openFrameworks/gl/ofGLUtils.cpp:1:
/home/gordon/graphic/openFrameworks/libs/openFrameworks/utils/ofConstants.h:211:12: fatal error: GL/glew.h: No such file or directory
   #include <GL/glew.h>
            ^~~~~~~~~~~
compilation terminated.
make[1]: *** [makefileCommon/compile.core.mk:238: /home/gordon/graphic/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/gl/ofGLUtils.o] Error 1
make: *** [makefileCommon/compile.core.mk:212: Debug] Error 2
there has been a problem compiling Debug OF library
please report this problem in the forums

I have also check in my /usr/include/GL folder and I have all the files there…

Perhaps I miss knowledge about linux and makefiles…

Any tips on how to fix it would be a bliss !
Thanks, have a nice day !

this fixed it for me:
sudo apt install freeglut3-dev