I have built the glew lib so many times. My last build removed the undefined references to all the shader functions such as glCreateShader(). I think this build
glCreateShader()
In Ubuntu 18.04 to work OpenGL the GLEW should be installed:
apt-get install libglew-dev
And it works when add linker option: "-lGLEW" to linker call, like in the Makefile for the FLTK:
... # HOW TO LINK .o$(EXEEXT): @echo "*** Linking $@..." $(CXX) $< $(LINKFLTK_ALL) -lGLEW -o $@