HP c8000 manual Linking shared libraries

Page 48

compiling and linking programs

linking shared libraries

linking shared libraries

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:

cc -g -Aa -D_hpUX_SOURCE -z \

-I/opt/graphics/OpenGL/include \

-I/usr/include/X11R6 -o cube.32 cube.c \ -L/opt/graphics/OpenGL/lib \ -L/usr/lib/X11R6 -ldld -lGLU -lGL \

 

-lXhp11 -lXext -lX11 -lm

 

To compile your application using ANSI C, you can also use the cc

 

command with either of the command line options +Aa or +Ae.

 

If you are going to compile your application using HP’s ANSI C++

 

compiler, use the aCC compiler.

 

See the HP 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 4-2

Shared Libraries

 

 

 

 

 

 

 

Library

Description

 

 

 

 

 

 

libGL

OpenGL routines

 

 

 

 

 

 

libX11

X11 routines

 

 

 

 

 

 

libXext

HP X11 extensions

 

 

 

 

 

46

Chapter 4

Image 48
Contents OpenGL Implementation Guide Legal Notices Contents Installation and setup Programming hints Contents Overview of OpenGL Introduction OpenGL Reference ManualOpenGL product Hp’s implementation of OpenGLHp’s implementation of the OpenGL libraries Supported graphics devices Supported operating systemsSupported visuals Visual Table for HP Visualize fxeVisual Table for ATI Fire GL T2/X1/X3 Stereo Visual Support for HP Fire GL-UX Visual support for other graphics devicesBuffer sharing between multiple processes and threads Sigchld and the GRM daemonBit programming Sample 64-bit compile and link for 11.x only SLS supportStandard OpenGL product OpenGL Utilities Library GLUInput and output routines OpenGL extensions for the X Window system GLXOpenGL product Mixing of OpenGL and Xlib Gamma correction OpenGL extensions Visibility test extensionsOcclusion extension Occlusion culling code fragmentsEnumerated Types for Occlusion GLHPsupersample extension Default visuals Rendering detailsEXP and EXP2 fogging Bow-tie quadrilateralsIndex mode dithering Decomposition of concave quadrilateralsVertices outside of a begin/end pair Environment variables New environment variables as of release Switches to the faster double buffering method Installation and setup Installation and setup Verification instructions Is your system software preloaded with instant ignition?Verify that OpenGL is on your workstation Installing OpenGL Install OpenGLOpenGL Development Environment Filesets for 11.0 Check log file Verify the product OpenGL file structure 64-bit libraries are in a subdirectory OpenGL file structure Chapter Running OpenGL programs Virtual GLX VGL mode Visual support for the VGL modeSpecial considerations Bool hpglXDisplayIsVGLDisplay *dpy, int screen Running hps implementation of the OpenGL stereo application Running hps implementation of the OpenGL stereo application Running OpenGL programs Compiling and linking programs Overview Subdirectory This Directory ContainsIncluding header files Linking shared libraries Compiling 32-bit and 64-bit applications for OpenGL OpenGL procedure calls Programming hints Programming hints OpenGL correctness hints 4D valuesTexture coordinates Glcompileandexecute mode OpenGL performance hintsDisplay list performance Geometric primitivesDraw array set extensions Textures State changes and their effects on display listsRegular primitive data Texture downloading performance Selection performanceState change Optimization of lighting Occlusion cullingHigh frame rate applications Rescaling normals OpenGL performance hints
Related manuals
Manual 27 pages 63.95 Kb Manual 8 pages 32.71 Kb Manual 89 pages 28.35 Kb