User's Guide

-L directory
-L directory
The directory parameter is the HP-UX directory where you want the linker to search for libraries
your program uses before searching the default directories.
The -L directory option causes the linker to search for libraries in directory in addition to using
the default search path.
See -lname option for default search path.
The -L option must precede any -lname option entry on the command line; otherwise -L is
ignored. This option is passed directly to the linker.
Example:
The following example compiles and links prog.C and directs the linker to search the directories
and /project/libs for any libraries that prog.C uses (in this case, mylib1 and mylib2).
aCC -L/project/libs prog.C -lmylib1 -lmylib2
-minshared
-minshared
The -minshared option indicates that the result of the current compilation is going into an
executable file that will make minimal use of shared libraries. This option is equivalent to -exec
-Bprotected.
+nostl
+nostl
By eliminating references to the standard header files and libraries bundled with HP aC++, the
+nostl option allows experienced users full control over the header files and libraries used in
compilation and linking of their applications, without potential complications that arise in mixing
different libraries.
NOTE: Complete understanding of the linking process and the behavior of the actual (third party)
libraries linked with the application is essential to avoid link or runtime failures.
For more information on shared libraries, see “Creating and Using Libraries” (page 175).
+Onolibcalls=
+Onolibcalls=function1,function2,...
This option allows you to turn off libcall optimizations (inlining or replacement) for calls to the listed
functions. This option overrides system header files.
Linker Options
You can specify the following linker options on the compiler command line:
-e epsym
-e epsym
Using the -e epsym option sets the default entry point address for the output file to be the same
as the symbol epsym. This option only applies to executable files. It does not work if epsym=xec.
-n
-n
The -n option causes the program file produced by the linker to be marked as sharable.
50 Command-Line Options