PDA

View Full Version : linker error using dev c++ and devpak



abhi1988
06-24-2011, 04:25 AM
hello,

I am new to opengl and have started learning from videotutorialsrock.com and really liking it.But when I copied their code in Dev c++ and compiled , it showed Linker error--undefined reference..please guide me how to correct it.

ZbuffeR
06-24-2011, 05:10 AM
Did you add the gl libraries ?
When posting an error message, please do not cut the important part (ie. which call is an undefined reference ?)

Besides, Dev c++ is not maintained anymore, see Code::Blocks for updates :
http://www.codeblocks.org/

abhi1988
06-24-2011, 05:25 AM
Thanks for the reply.. I am new to opengl and also is more into java. Due to some work, I have to switch to opengl with c++.
Linker error- undefined referece to glEnable
Linker error- undefined referece to glViewport
Linker error- undefined referece to glVertex
Linker error- undefined referece to glLoadIdentity
Linker error- undefined referece to glMatrixMode
and like this there are 32 errors , means every single function of gl and glut is in error.

Kindly guide me how to add libraries? and also advice me with any good IDE for c++ + opengl.

Regards

Abhi

ZbuffeR
06-24-2011, 01:57 PM
first google hit for "devc++ opengl" :
http://onecore.net/dev-c-opengl.htm
read the stuff around -lglut etc.

As I said, codeblocks is good.

mhagain
06-24-2011, 03:57 PM
On Windows MSVC is unbeatable. If you need portability then I'd probably also recommend Code::Blocks as an IDE.