PDA

View Full Version : DEV C++ GLUT PROBLEMS



04-13-2004, 04: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?

chowe6685
04-13-2004, 05:20 PM
#define GLUT_DISABLE_ATEXIT_HACK

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

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

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

plasmonster
04-13-2004, 06: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...