IdentifiantMot de passe
Mot de passe oublié ?Je m'inscris ! (gratuit)

NeHe Productions: OpenGL Lesson #Solaris

Date de publication : 31/03/2006 , Date de mise à jour : 31/03/2006

Par Lakmal Gunasekara (Autres articles)

Lesson: Solaris This document describes (quick and dirty) how to install OpenGL and GLUT libraries under Solaris 7 on a Sun workstation.

The Development Tools:

Make sure you have a Solaris DEVELOPER installation on your machine. This means you have all the header files that are nessesary for program development under Solaris installed. The easiest way is to install Solaris as a development version. This can be done from the normal Solaris installation CD ROM.

After you've done this you should have your /usr/include and /usr/openwin/include directories filled with nice liddle header files.

The C Compiler:

Sun doesn't ship a C or C++ compiler with Solaris. But you're lucky. You don't have to pay :-)

There you find gcc the GNU Compiler Collection for Solaris precompiled and ready for easy installation. Get the version you like and install it.
> pkgadd -d gcc-xxxversion
This will install gcc under /usr/local. You can also do this with admintool:
> admintool
Browse->Software Edit->Add

Then choose Source: "Hard disk" and specify the directory that you've stored the package in.

I recommend also downloading and installation of the libstdc++ library if nessesary for you gcc version.

The OpenGL library

OpenGL should be shipped with Solaris these days. Check if you've already installed it.
> cd /usr/openwin/lib
> ls libGL*
This should print:***
This means that you have the libraries already installed (runtime version).

But are the header files also there?
> cd /usr/openwin/include/GL
> ls
This should print:
gl.h glu.h glxmd.h glxtokens.h
glmacros.h glx.h glxproto.h
I have it. But what version is it?

This is a FAQ.

Helps you with questions dealing with OpenGL on Sun platforms.

Yes cool. Seems they're ready. Skip the rest of this step and go to GLUT .

You don't already have OpenGL? Your version is too old? Download a new one:

Helps you. Make sure to get the nessesary patches for your OS version and install them. BTW. You need root access to do this. Ask you local sysadmin to do it for you. Follow the online guide for installation.


Now you have OpenGL but not GLUT. Where can you get it? Look right here:

I've personally downloaded the 32bit version unless I run the 64 bit kernel of Solaris. I've installed GLUT under /usr/local. This is normally a good place for stuff like this.

Well I have it, but when I try to run the samples in progs/ it claims that it can't find libglut.a. To tell your OS where to look for runtime libraries you need to add the path to GLUT to your variable LD_LIBRARY_PATH.

If you're using /bin/sh do something like this:
> LD_LIBRARY_PATH=/lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/sparc_solaris/glut-3.7/lib/glut
If you're using a csh do something like this:
> setenv LD_LIBRARY_PATH /lib:/usr/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/lib:/usr/local/sparc_solaris/glut-3.7/lib/glut
Verify that everything is correct:
Congratulations you're done!

That's it folks. Now you should be ready to compile and run NeHe's OpenGL tutorials.

If you find spelling mistakes (I'm not a native english speaking beeing), errors in my description, outdated links, or have a better install procedure please contact me.

Lakmal Gunasekara 1999 for NeHe Productions.

Valid XHTML 1.1!Valid CSS!

Les sources présentées sur cette page sont libres de droits et vous pouvez les utiliser à votre convenance. Par contre, la page de présentation constitue une œuvre intellectuelle protégée par les droits d'auteur. Copyright © 2006 Nehe Aucune reproduction, même partielle, ne peut être faite de ce site ni de l'ensemble de son contenu : textes, documents, images, etc. sans l'autorisation expresse de l'auteur. Sinon vous encourez selon la loi jusqu'à trois ans de prison et jusqu'à 300 000 € de dommages et intérêts.