HP j6700 OpenGL Implementation Guide for HP-UX 11.x - Page 48

linking shared libraries, Table 4-2, Shared Libraries

Page 48 highlights

compiling and linking programs linking shared libraries Table 4-2 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. Shared Libraries Library libGL libX11 libXext Description OpenGL routines X11 routines HP X11 extensions 46 Chapter 4

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62

compiling and linking programs
linking shared libraries
Chapter 4
46
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