0

[Linker error] undefined reference to `__glutInitWithExit@12'

[Linker error] undefined reference to `__glutCreateWindowWithExit@8'

[Linker error] undefined reference to `__glutCreateMenuWithExit@8'

[Linker error] undefined reference to `glutSolidSphere@16'

the problem above came out if i include glut.h header.. why?

i cant use glutSolidSphere() without it..
im using DEV C++ btw..

genpfault
  • 49,394
  • 10
  • 79
  • 128
noob88
  • 287
  • 2
  • 9
  • 17

1 Answers1

1

The glut.h header just declares the functions. You need to link with the library that implements them, which should be described in the glut documentation.