Undefined reference to `_imp__glewInit@0'

前端 未结 3 1250
野性不改
野性不改 2020-12-10 14:48

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

3条回答
  •  春和景丽
    2020-12-10 15:50

    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 $@
    

提交回复
热议问题