HP-UX SNAplus2 NOF Programmer's Guide

Writing NOF Applications
Compiling and Linking the NOF Application
Chapter 2 103
Compiling and Linking the NOF Application
Applications are compiled with different options in order to select one of
the scheduling modes described in “Scheduling Asynchronous Events”.
NOTE Applications that useasynchronous API callbacks musteither be built as
multithreaded applications or include support for the application
scheduled mode. Motif applications must include the code fragment
described in “Motif Applications”.
Applications linked with previous versions of SNAplus2 that used
signal-based scheduling mode and the single-threaded library,
libmgr.sl, will continue to work in the current version of SNAplus2.
However, this library is provided only for back-compatibility. New
applications should not use this library.
You can use the following options when you link your program (for
specific examples of link commands, see “Linking Motif Applications and
Applications That Use Application Scheduled Mode” and “Linking
Multithreaded Applications”):
-I Indicates the include path.
-L Indicates the directory of the library or libraries to be
used when linking the application.
-l Each -l indicates the name of a library.
Linking Motif Applications and Applications That Use
Application Scheduled Mode
For HP-UX operating systems, link with the following options:
cc -I /opt/sna/include -L /opt/sna/lib -lnof -lsna
Linking Multithreaded Applications
For HP-UX operating systems, linking options depend on the version of
the operating system: