Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP's Implementation of OpenGL: HP 9000 Workstations > Chapter 5 Compiling and Linking Programs

Linking Shared Libraries

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

OpenGL is supported on workstations using shared libraries that must be linked with the application program.

When you compile your OpenGL programs, you must link the application with the OpenGL library libGL. Notice that the OpenGL library is dependent on the HP X extensions library (libXext).

An ANSI C compile line will typically look similar to this:

c89 program.c \
-I/opt/graphics/OpenGL/include \
-L/opt/graphics/OpenGL/lib \
-lXext -lGL -lX11

Note that to compile your application using ANSI C, you can also use the cc command with either of these command line options: +Aa or +Ae.

If you are going to compile your application using HP's ANSI C compiler or cfront C compiler, use one of the following commands:

Title not available (Linking Shared Libraries)

aCC

— used to compile an ANSI C application.

CC +a1

— used to compile a cfront C application.

See the Graphics Administration Guide for more information on compiling.

This table summarizes the shared libraries and X11 directories that are linked on the command line example above.

Table 5-2 Shared Libraries

Library

Description

libGL

OpenGL routines

libX11

X11 routines

libXext

HP X11 extensions

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1996 Hewlett-Packard Development Company, L.P.