56

I installed OpenGL onto my computer running Linux Mint following the instructions on this tutorial. I am trying to compile a program that uses OpenGL, but I'm getting a compile error: fatal error: GL/glew.h: No such file or directory. I check the /usr/include/GL folder, and glew.h is indeed missing. I don't know why it's missing, because I did the command sudo apt-get install libglew1.5 and it gives the output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libglew1.5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 465 not upgraded.

Why is the glew.h file missing?

rurouniwallace
  • 2,027
  • 6
  • 25
  • 47
  • 2
    FYI: GLEW 1.5 [is *ancient*; it's from 2007](http://glew.sourceforge.net/). You shouldn't use it for anything, and if a tutorial is telling you to do so, you should use another tutorial. – Nicol Bolas Apr 06 '13 at 15:09
  • @NicolBolas Hmm...well this is the tutorial given to me by my professor. What alternatives are there? – rurouniwallace Apr 06 '13 at 15:11
  • @NicolBolas I tried doing apt-get install for 1.9, and it said it couldn't find it. I kept trying for every newer version and kept getting the same error until 1.6. And even after installing 1.6, I'm still having the same problem--glew.h is still missing. – rurouniwallace Apr 06 '13 at 15:21
  • You could probably use [`GLee`](http://elf-stone.com/glee.php) instead, it does the same stuff as GLEW but easier to use. Just one header and one C file to add to your project. – Ben Voigt Apr 06 '13 at 16:08

2 Answers2

64

libglew is just the library, but not the development files (headers). You need to install those separately. The package name on Debian based systems is libglew-dev and for fedora(and possibly its derivatives) it is glew-devel

gideon
  • 19,329
  • 11
  • 72
  • 113
datenwolf
  • 159,371
  • 13
  • 185
  • 298
49

Run the following command:

sudo apt-get install libglew-dev
Kolay.Ne
  • 1,345
  • 1
  • 8
  • 23
androidwifi
  • 1,009
  • 10
  • 8