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
  • 51,148
  • 11
  • 85
  • 139
noob88
  • 297
  • 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.