ulrichard / ftgl

fork from http://sourceforge.net/projects/ftgl
Other
56 stars 44 forks source link

Undefined reference to glew #7

Open nikhilrayaprolu opened 7 years ago

nikhilrayaprolu commented 7 years ago

while I am working on rendering fonts using ftgl in my opengl project I am encountering errors stating

g++ -o mygame Sample_GL3_2D.cpp glad.c -lGL -lglfw -ldl -lftgl  -lSOIL -I /usr/include/freetype2 -L/usr/local/lib -lfreetype
/usr/local/lib/libftgl.so: undefined reference to `__glewGenBuffers'
/usr/local/lib/libftgl.so: undefined reference to `glewInit'
/usr/local/lib/libftgl.so: undefined reference to `__glewBindVertexArray'
/usr/local/lib/libftgl.so: undefined reference to `__glewBindBuffer'
/usr/local/lib/libftgl.so: undefined reference to `__glewUniform3f'
/usr/local/lib/libftgl.so: undefined reference to `__glewVertexAttribPointer'
/usr/local/lib/libftgl.so: undefined reference to `__glewBufferData'
/usr/local/lib/libftgl.so: undefined reference to `__glewDeleteBuffers'
/usr/local/lib/libftgl.so: undefined reference to `__glewDeleteVertexArrays'
/usr/local/lib/libftgl.so: undefined reference to `__glewGenVertexArrays'
/usr/local/lib/libftgl.so: undefined reference to `__glewEnableVertexAttribArray'

these are my contents in Makefile

all:mygame

mygame: Sample_GL3_2D.cpp glad.c
    g++ -o mygame Sample_GL3_2D.cpp glad.c -lGL -lglfw -ldl -lftgl  -lSOIL -I /usr/include/freetype2 -L/usr/local/lib -lfreetype
clean:
    rm mygame

looks like the errors is being raised by the libftgl.so library. I have installed the GLEW using the glew packages in the ubuntu. but dont understand why it isn't being referenced.

yzhang88 commented 6 years ago

did you solve this problem?