Skip to content

Undefined reference to glew  #7

@nikhilrayaprolu

Description

@nikhilrayaprolu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions