HP Visualize J5000 hp workstations - hp-ux 10.20 graphics administration guide - Page 16
Compiling with Archive Libraries
View all HP Visualize J5000 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 16 highlights
Compiling with Archive Libraries If you are using archived libraries, you need to include your device's driver library Note: Shared libraries are used by default unless you specify that you want to use archived libraries (by specifying "-Wl,-a,archive To compile a C program using archived libraries, you would use the following command: cc example.c -I -Wl,-a,archive -L/lib \ -L -I/Motif1.2_R6 -ldddl \ -Wl,-E -Wl,+n -l:libdld.sl -lXwindow -lphigs -ldl \ -lhpgfx1 -lhpgfx2 -lXhp11 -lXi -lXext -lX11 -lm \ -o example The "-l:libdld.sl" above specifies the dynamic loader, which is available only in shared-library form. Multiple graphics device driver libraries may be indicated in the location. For example, if your application source file is called app_one.c and the executable is app_one and you are using the CRX graphics device driver (libddgcrx), your compile command would look like this: cc app_one.c -I -Wl,-a,archive -L/lib \ -L -I/Motif1.2_R6 -ldddl -lddgcrx \ -Wl,-E -Wl,+n -l:libdld.sl -lXwindow -lphigs -ldl \ -lhpgfx1 lhpgfx2 -lXhp11 -lXi -lXext -lX11 -lm \ -o app_one The "-l:libdld.sl" above specifies the dynamic loader, which is available only in shared-library form. Fortran users can simply replace cc with fort77 in the above command. Also, if you are a Fortran user and prefer using the f77 command, you can replace cc with f77 and change linking options that are specified as follows: -L to -Wl,-L For more information on compiling and linking, read the section "PHIGS PLUS Differences Between HP-PHIGS 2.2/2.3 and 3.0" in the chapter "Functional Overview" in the HP-PHIGS Graphics Techniques manual. Page 16 Graphics Administration Guide for HP-UX 10.20