This is a simple tutorial to show a new linux user (such as myself) how to setup freeglut and OpenGl. System used IBM T22 ThinkPad: mobile pentium 3 900mhz 256mb ram 20GB hd S3 Inc. 86C270-294 Savage/IX-MV (rev 13) video card OS: xubuntu 6.10 I have just recently become a linux user and wanted to install freeglut to do my graphics assignments on my laptop. Although the install did not turn out to be very difficult it took me a while to do. So I have written this tutorial in case another young linux user comes along and decides he/she wants to install freeglut and OpenGL. **This tutorial assumes that you have your operating system installed and you have access to the internet** Steps: From a terminal 1) sudo apt-get update -This will update your apt database to the most recent available packages. 2) sudo apt-get install build-essential - This installs the necessary development tools for building source code. 3) sudo apt-get install freeglut3-dev - This installs the development libraries and headers for freeglut. Your done! Extremely simple! However you must remember that when compiling you must add a '-lglut' as a comand line argument to gcc. If you don't it cannot find the library's and you will get undefined reference errors. example command line: gcc simple.c -lglut At this point if your program compiles and runs then you are finished. However the first time I tried to run mine I received a 'libGL warning: 3D driver claims to not support visual 0x42'. This error means I cannot display the required colors to run the program. In my case I had the most recent drivers for my video card. So I did some research on my monitor and found out it can display a color depth of 24 instead of the 16 it was set at. To fix this problem you must edit the /etc/X11/xorg.conf file as root and set the 'DefaultDepth 24'. Reboot and the problem is solved. This is my first post (and tutorial) on the ubuntuforums. If people feel that this tutorial is not needed they can feel free to remove it. If anyone wants to add anything related to freeglut or OpenGl please feel free.
thank you, thank you, thank you!!!
Thanks!! Just what i was looking for. Btw has anyone tried to compile the freeglut package manually because i tried that before this apt-get method and it spewed out errors. Please help me out.
Originally Posted by l3ftm1n0r Thanks!! Just what i was looking for. Btw has anyone tried to compile the freeglut package manually because i tried that before this apt-get method and it spewed out errors. Please help me out. What errors? according to apt-get the package is there
Ubuntu user -16351
Thanks Man!
Steam: ubuntugamer( Add me ) | Gaming: Left 4 Dead 2, Metro Last Light, Assassin's Creed 4, Forced
Previously I am using 9.04. It has installed a software called Autodoc. It requires freeglut. While upgrading to Ubuntu 10.04 LTS, all rpm files are disabled. I have again install freeglut. But while trying to run this software it shows following error. Try adjusting the vblank_mode configuration parameter. freeglut ERROR: Function <glutSolidSphere> called without first calling 'glutInit'. Can any one help to solve this?
Those steps are very quick and very helpful. To go with that speed, it would be nice to have a simple.c to try compiling at the end instead of having to look around for examples that will work with the newly installed freeglut package.
Hey. I want to start working with GL, I'm a newbie here on that. Apparently i got a "code-test" to check if the packages are installed. Apparently all of them are! still, It gives me an error on the Terminal. This one: g++ -Wall -o cube main.cpp imageloader.cpp -lglut imageloader.cpp: In function ‘Image* loadBMP(const char*)’: imageloader.cpp:141: warning: suggest parentheses around ‘&&’ within ‘||’ /tmp/ccenhiwc.o: In function `handleResize(int, int)': main.cpp.text+0x183): undefined reference to `gluPerspective' collect2: ld returned 1 exit status make: *** [cube] Error 1 I'm probably overlooking something. Can you help me out?
When I do the last step I get this error. Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: freeglut3-dev : Depends: libglu1-mesa-dev but it is not going to be installed or libglu-dev E: Broken packages if I try this command sudo apt-get install libglu1-mes I get this. Reading package lists... Done Building dependency tree Reading state information... Done libglu1-mesa is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. Any ideas?
@lsteamer I'm getting the same errors. I worked with those video tutorial's on window's and they all compiled fine. I really want to fix that.
Ubuntu Forums Code of Conduct