Undefined references in OpenGL
-
This post is deleted!
-
Hi
Try adding
#define GLUT_DISABLE_ATEXIT_HACK
before your first glut.h include.
https://community.khronos.org/t/glut-undefined/14242Its a shot in the dark, however, it seems to find all the other functions so i dont think
its just due not finding the libs to link with. -
This post is deleted!
-
-lglut -lGLUT -lfreeglut
First of all glut and GLUT are the same so that's redundant. Second, glut and freeglut are two different libraries. Which one are you actually using? Third, if you're using glut then the lib is (usually) called glut32, not glut, so check what the name of the .lib or .a file actually is.
Next, you need to specify the path to the library ie.LIBS += -Lpath_to_glut_or_freeglut_lib_dir
. Last but not least - after you make changes to the .pro file make sure you re-run qmake (menu Build - >Run qmake), otherwise those changes might not get picked up.