Wednesday, August 04, 2010

How to compile QuesoGLC under SUN Solaris 10

The OpenGL Character Renderer (GLC) is a state machine that provides OpenGL programs with character rendering services via an application programming interface (API).

This tutorial tells How to compile QuesoGLC under SUN Solaris 10 platform.

Step 1: To compile QuesoGLC under SUN Solaris, you need following software installed.
GCC, X11 development files and Graphics card drivers.
You can install these from Sun Freeware and NVidia Unix website.

Step 2: Once you install all the above softwares, go-to QuesoGLC homepage and download the source code.

Step 3: Extract the downloaded QuesoGLC archive file.

Browse through the directory using Nautilus and right click on the archive file and click on extract.

Step 4: Open the terminal window and go-to extracted directory using cd command.

Step 5: Set the include directories for compilation.

Due to some unknown reason I had to set the include directory using the environmental variables. Hence this step may or may not be required for you.

C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/X11/include/
export C_INCLUDE_PATH

and

CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/X11/include/
export CPLUS _INCLUDE_PATH


Without the above commands I was getting following error while running configure script:

configure: error: OpenGL not found.

Step 6: Set the X11 libraries for linking.

Set LD_LIBRARY_PATH environmentable varibale.

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/X11/lib/
export LD_LIBRARY_PATH


If you want the permanent solution the issue following command as root:
crle -u -l /usr/X11/lib

Step 7: Run the confiture script.

Code>./configure
With above command QuesoGLC would be compiled to install in its default installation path. (/usr/local)

Incase you don’t want to install quesoglc in its default installation path then instead you can issue following command,
Code>./configure –prefix=/sect/package/quesoglc

where prefix says the directory into which you will be installing QuesoGLC.

Step 8: Run maketool to compile QuesoGLC.

Issue either of the following command based on which maketool you are using.

gmake
OR

make

Step 9: Install the QuesoGLC.

Once you have successfully compiled, you can install QuesoGLC.

Issue either of the following command as root:

gmake install
OR

make

depending upon your maketool.

Step 10: Modify the include directory and library.

Now that you have successfully compiled and installed QuesoGLC, you need to add the QuesoGLC installation directory in your header file and library look-up paths.

eg:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sect/package/quesoglc/lib
export LD_LIBRARY_PATH


If you want the permanent solution the issue following command as root:

crle -u -l /sect/package/quesoglc/lib

You may want to modify the path /sect/package/quesoglc/lib according to your quesoglc installation path.

Also include QuesoGLC include directory in your header file look-up path before you compile your first GLC program.

Good Luck.

Technorati tags: , .