Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined reference to glew #128

Closed
vegullasrikavya opened this issue Jan 17, 2017 · 0 comments
Closed

Undefined reference to glew #128

vegullasrikavya opened this issue Jan 17, 2017 · 0 comments

Comments

@vegullasrikavya
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants