0

enter image description here

when I try to create a cube in using c++ and glut but it returns the errors;

q-3d.cpp: (.text+0xc5): undefined reference to `glutInit', 
q-3d.cpp: (.text+0xcf): undefined reference to `glutCreateWindow', 
q-3d.cpp: (.text+0xde): undefined reference to `glutInitWindowSize',
q-3d.cpp: (.text+0xed): undefined reference to `glutInitWindowPosition', 
q-3d.cpp: (.text+0xf7): undefined reference to `glutDisplayFunc' and 
q-3d.cpp: (.text+0xfc): undefined reference to `glutMainLoop'  
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
  • 4
    The error you're seeing is a linker error (source code is correct, but compiler fails to find the glut library when assembling the final binary). You need to link your program with glut when compiling: try to add this library in your makefile or in the project options of your IDE. – neodelphi Mar 31 '18 at 06:58
  • thank you so much you are a true hero. – John Wilson Mar 31 '18 at 07:36

0 Answers0