HELP! dev c++ and glut

Started by
6 comments, last by Conor_BloodMoon 19 years, 5 months ago
*Assume i am an idiot OK proceed* Hello basically i was wondering if someone could explain to me how to get glut working with dev c++. I have checked out lots of websites but their steps don't work i.e. i get lots of linker errors even though i'm doing exactly what they say. (for opengl programming) Also please note i have been only doing very basic graphic programing in kdevelop in linux and all i know to run the programs write some code like drawVertCylinder and then in terminal typing make && ./(something like lab06 for the sixth lab etc). SO i have no idea about anything really but i can write the actual internal coding i.e. draw stuff. Unfortunately i have a project to do and realistically to do it well i have to be able to program at home i.e. windows and dev++(which someone recommended to me) So help!! And Thanks ;)
Advertisement
You're asking a very general question. It would be easier for people to help if you could give the exact errors you're encountering.
OK... Basically i need to know how to install and run glut in windows cause nothing i do seems to work(i'm trying to do opengl programming). I.E. if i try to compile something i get errors for basically every function that have tag <linker error> ......

Also can i take openGl files made in unix directly into dev c++ or is there any conversion involved?

P.S. I have been looking at this stuff online but the solutions i could find didn't work so i was hoping someone could tell me how to do it in the most basic of English.
Try devpaks.org. they have a GLUT package for DevC++/MinGW
i've tried whats on this page here http://www.cs.uofs.edu/~mpc3/cmps370/glutsetup.html
this doesn't compile and i get loads of errors in the form

[Linker error] undefined reference to `glutSwapBuffers@0'

[Linker error] undefined reference to `glutInit@8'

[Linker error] undefined reference to `glutInitDisplayMode@4'

etc..
what am i doing wrong?
Quote:Original post by Conor_BloodMoon
i've tried whats on this page here http://www.cs.uofs.edu/~mpc3/cmps370/glutsetup.html
this doesn't compile and i get loads of errors in the form

[Linker error] undefined reference to `glutSwapBuffers@0'

[Linker error] undefined reference to `glutInit@8'

[Linker error] undefined reference to `glutInitDisplayMode@4'

etc..
what am i doing wrong?


Link to GLUT.

-opengl32 -glu32 -lglut32 (or -lglut)
Hey Conor, i got the same problem.

Well if you are getting linker error its probably cause you forgot to add the commands that VAmpyre_Dark listed.To do it, go to Tools , compiler options, mark the box "Add these commands ....linker something.And type the commands

To do it in Unix try to compile with this line : gcc -o program program.c -opengl(check the name in unix i dont remenber) -glut -glu.Off course its very boring to do this every time you need to compile something, so try to make an .ini file.

Note: If you have a native opengl Hardware on your pc AVOID Mesa.It may slow down your Opengl Apps...



As i said here

I've tried whats on this page here http://www.cs.uofs.edu/~mpc3/cmps370/glutsetup.html
this doesn't compile and i get loads of errors in the form

[Linker error] undefined reference to `glutSwapBuffers@0'

[Linker error] undefined reference to `glutInit@8'

quote]

i did exactly what it said to do including the -opengl32 -lglu32 -lglut32 bit in project options but to no avail i still get the errors coming up

This topic is closed to new replies.

Advertisement