Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX SNAplus2 API NOF Programmer's Guide: HP-UX 11.0, 11i v1, and 11i v2 > Chapter 2 Writing NOF Applications

Compiling and Linking the NOF Application

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Applications are compiled with different options in order to select one of the scheduling modes described in “Scheduling Asynchronous Events”.

NOTE: Applications that use asynchronous API callbacks must either 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:

  • For HP-UX 10.20 (only DCE threads are supported), link with the following options:

    cc -I /opt/sna/include -L /opt/sna/lib -lnof -lmgrdce -ldce
  • For HP-UX 11.0 using DCE threads, link with the following options:

    cc -I /opt/sna/include -L /opt/sna/lib -lnof -lsna -ldce
  • For HP-UX 11.0 using Kernel threads, link with the following options:

    cc -I /opt/sna/include -L /opt/sna/lib -lnof -lsna -lpthread
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003 Hewlett-Packard Development Company, L.P.