aCC -Idir1 -Idir2 -c a.C

With view-pathing on, the following example searches for quoted include files in dir1 first and dir2 next, followed by the standard include directories, ignoring the directory of a.C. Angle-bracketed includes are searched for in dir2 first, followed by the standard include directories.

aCC -Idir1 -I- -Idir2 -c a.C

NOTE: Some of the compiler’s header files are included using double quotes. Since the -I-option redefines the search order of such includes, if any standard headers are used, it is your responsibility to supply the standard include directories (/opt/aCC/include* and /usr/ include) in the correct order in your -I-command line.

For example, when using -I-on the aCC command line, any specified -I directory containing a quoted include file having the same name as an HP-UX system header file, may cause the following possible conflict.

In general, if your application includes no header having the same name as an HP-UX system header, there is no chance of a conflict.

Suppose you are compiling program a.C with view-pathing on. a.C includes the file a.out.h which is a system header in /usr/include:

aCC -IDevelopmentDir -I- -IOfficialDir a.C

If a.C contains:

//This is the file a.C #include <a.out.h>

//...

When a.out.h is preprocessed from the /usr/include directory, it includes other files that are quote included (like #include "filehdr.h").

Since with view-pathing, quote enclosed headers are not searched for in the including file’s directory, filehdr.h which is included by a.out.h will not be searched for in a.out.h’s directory (/usr/include).

Instead, for the above command line, the system header is first searched for in DevelopmentDir, then in OfficialDir and if it is found in neither, it is finally searched for in the standard include directories, /opt/aCC/include* and /usr/include, in the latter of which it will be found.

However, if you have a file named filehdr.h in DevelopmentDir or OfficialDir, that file (the wrong file) will be found.

Online Help Option

Use the +help option to view the HP aC++ Online Help.

+help

+help

The +help option invokes the initial menu window of this HP aC++ Online Help.

If +help is used on any command line, the compiler displays the HP aC++ Online Help with the default web browser and then processes any other arguments.

If $DISPLAY is set, the default web browser is used. If the display variable is not set, a message is displayed. Set your $DISPLAY variable as follows:

export DISPLAY=YourDisplayAddress (ksh/sh shell notation)

setenv DISPLAY YourDisplayAddress (csh shell notation)

Examples:

Online Help Option 47

Page 47
Image 47
HP C/aC++ for PA-RISC Software manual Online Help Option, +help