[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 Version 4.1 for AIX: Programming Concepts

SGI GL File Transfer Compiling and Linking

The Silicon Graphics workstations offered since1990 include: Personal IRIS, GT Graphics, POWERSeries 4D/200, and POWERSeries 4D/300. Data in each pair of bytes is restored in different order on these platforms than the order data is restored on your system. There are two ways to overcome this problem while transferring files:

  1. Receive original archive files from the source platform, and swap bytes on the destination platform:
    dd if=/dev/rmt0 conv=swab | tar -xf -
  2. Use the nonswap tape device when writing tapes on SGI systems. This will write a QIC 150 format tape on an IRIS machine, which then can be read by your system.
    tar -cf/dev/rmt0/tps0d7ns

To code a C program in your GL environment, the related GL include files should be specified in the program.

#include <gl/gl.h>
#include <gl.device.h>

Application programs from a source platform usually invoke unsupported and obsolete subroutines. The glport.h file is provided for those who do not wish to clean up these old interfaces. Include the following statements in the application to declare these old subroutines void:

#define _GL_PORT_C_ 1
#include <gl/glport.h>

On SGI platforms, GL is shipped in two libraries: libgl.a and libgl_s.a. Linking to the first library results in a static link to GKL subroutines: the code for the GL routines is placed directly in the application binary, swelling its size considerably. The second library is a shared library. Linking to it does not pull GL library code into the application binary; rather, the shared library is dynamically loaded when the application is run. This results in a smaller application binary and in decreased memory usage when multiple GL applications are running simultaneously.

On your platform, there is only one library, libgl.a. This library is a shared library by default. One must not link a GL application nonshared on your equipment. On newer SGI GL releases, GL applications must link to both libgl.a and libX11.a, even though X11 is not being used directly. This is not required on your platform; such linkage is performed automatically.

The following GL subroutines are no longer supported. The functions that they formerly accomplished are not applicable to the current system. They are considered obsolete and should not be used in new code development. As an aid to portability, stubs for these subroutines can be found in the /usr/lpp/gl/examples/gifts/glports.h file.

Undefined Functions

dbtext endpupmode
pupmode setfastcom
setslowcom

Redefined Functions

#define getdepth lgetdepth  
#define RGBrange IRGBrange
#define setdepth lsetdepth 

Functions Returning Only One Value

endfeedback 0
gethitcode 0
ismex TRUE

Functions Having Null Definitions

clearhitcode devport
feedback foreground
getlsbackup getpor
getport getresetls
gettp gewrite
gRGBcursor imakebackground
lsbackup pagecolor
pagewritemask passthrough
resetls RGBcursor
setshade shaderange
textcolor textinit
textwritemask winattach
xfpt xfpti
xfpts xfpt2
xfpt2i xfpt2s
xfpt4s xfpt4i
xfpt4

Functions That Are Not Defined in libgl.a

dglopen
dglclose
callfunc (define as null in glport.h)
e_callfunc
setvideo (define as null in glport.h)
getvideo (define as null in glport.h)
setmonitor (define as null in glport.h)
getmonitor (returns HZ60)
getothermonitor (returns HZ60)

[ Previous | Next | Contents | Glossary | Home | Search ]