# HELP! dev c++ and glut

This topic is 4969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

*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 ;)

##### Share on other sites
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.

##### Share on other sites
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.

##### Share on other sites
Try devpaks.org. they have a GLUT package for DevC++/MinGW

##### Share on other sites
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?

##### Share on other sites
Quote:
 Original post by Conor_BloodMooni've tried whats on this page here http://www.cs.uofs.edu/~mpc3/cmps370/glutsetup.htmlthis 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?

-opengl32 -glu32 -lglut32 (or -lglut)

##### Share on other sites
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...

##### Share on other sites
As i said here

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

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631435
• Total Posts
3000056
×