noob88
noob88

Reputation: 297

Linker errors with glut.h

[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..

Upvotes: 0

Views: 1737

Answers (1)

anon
anon

Reputation:

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.

Upvotes: 1

Related Questions