View Full Version : DEV C++ GLUT PROBLEMS

04-13-2004, 03:28 PM
i start a new open gl project with dev c++ and i do everything that this web site says http://3dcoders.bugpower.ch/gluttut.htm
and when i go to compile it it says
c:\dev-c++\main.o(.text+0x17):main.cpp: undefined reference to `__glutInitWithExit@12'
c:\dev-c++\main.o(.text+0x3b):main.cpp: undefined reference to `__glutCreateWindowWithExit@8'
c:\dev-c++\main.o(.text+0x67):main.cpp: undefined reference to `__glutCreateMenuWithExit@8'
any help?

04-13-2004, 04:20 PM

04-13-2004, 05:09 PM
hmmmmm i tried that, is there anywhere where u are supposed to put that in the code?

04-13-2004, 05:26 PM
before including glut.h

04-13-2004, 05:29 PM
you are my freaking hero, lol, thxs

04-13-2004, 05:32 PM
You need to make sure you include gthe glut header, and link with the glut library.

// include the header, wherever it may be.
#include "glut.h"

// link to the library - assumes visual c++ on win32
// you can also add glut32.lib to the project->settings->link tab: object/library modules list
#pragma comment( lib, "glut32" )

oops, problem solved already...