Sign in to follow this  

HELP! dev c++ and glut

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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 this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
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 this post


Link to post
Share on other sites
As i said here

[quote]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

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this