recommends an alternative method. The dynamic linker, during its attempt to load libraries, will suffix candidate directories with the machine type. The HP XC system on the CP4000 platform uses i686 for
Example
/opt/mypackage/include/mystuff.h
/opt/mypackage/lib/i686/libmystuff.a
/opt/mypackage/lib/i686/libmystuff.so
/opt/mypackage/lib/x86_64/libmystuff.a /opt/mypackage/lib/x86_64/libmystuff.so
If you have an existing paradigm using different names, HP recommends introducing links with the above names. An example of this is shown in Example
Example
/opt/mypackage/include/mystuff.h
/opt/mypackage/lib/32/libmystuff.a
/opt/mypackage/lib/32/libmystuff.so
/opt/mypackage/lib/64/libmystuff.a
/opt/mypackage/lib/64/libmystuff.so
/opt/mypackage/lib/i686
Linking an application using the library (dynamic or archive) requires you to specify the appropriate subdirectory, depending on whether the application is
For example, to build a
<linkcommand> <32-bit> -L/opt/mypackage/lib/i686 -lmystuff
To build a 64-bit application, you might enter:
<linkcommand> <64-bit> -L/opt/mypackage/lib/x86_64 -lmystuff
Note that there is no shortcut as there is for the dynamic loader.
44 Developing Applications