compiling and linking programs

compiling 32-bit and 64-bit applications for OpenGL

compiling 32-bit and 64-bit applications for OpenGL

The following sample compile and link lines may help you to build your application once it has been ported to take advantage of 64-bit capabilities.

Sample 32-bit compile and link:

cc-g -Aa -D_<ABBR>hp</ABBR>UX_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

Sample 64-bit compile and link (for 11.x only):

cc-g -Aa +DA2.0W -D_hpUX_SOURCE -z \ -I/opt/graphics/OpenGL/include \ -I/usr/include/X11R6 -o cube.64 cube.c \ -L/opt/graphics/OpenGL/lib/pa20_64 \ -L/usr/lib/X11R6/pa20_64 -L/usr/lib/pa20_64 \ -L/usr/lib -ldld \

-lGLU -lGL -lXhp11 -lXext -lX11 -lm

Chapter 4

47