| Syntax: | Default: |
| link(libSearchPath, path) |
This option specifies the search path for libraries at the link stage of a VisualAge C++ build.
On AIX,
this option also specifies the search path for shared libraries
to be loaded at run time. The path specified with this option is
stored in the build target. If you set the LIBPATH environment
variable, the variable overrides the path specified here.
When VisualAge C++ looks for libraries to link, the search has two distinct stages:
The default libSearchPath option path will be searched after any paths you specify using this option, and before the default system search path.
Multiple search paths can be specified in the following ways:
using the ":" separator within a single option string
using the ";" separator within a single option string
- using multiple options within the same option directive; paths are appended in the order they appear
- using nested option directives; paths in inner directives are prepended to paths in outer directives
The following example illustrates the order in which multiple search paths are concatenated:
option link(libsearchpath,"a:b") {
option link(libsearchpath, "c:d") link(libsearchpath,"e:f") {
option link(libsearchpath,"g:h") {
source ...
}
}
}
The option directives above apply the specified paths to the source in the following order:
g,h,c,d,e,f,a,b
On AIX,
you can also specify a prefix for the paths specified with this
option by building with option link(libSearchPathPrefix,
path). Usually you do this to build on one level
of AIX to run on a different level, so that you can search a
different path on the development platform than on the target
platform. The prefix is not stored in the executable.
![]()
Incremental C++ Build
C Compilation
Configuration Files
Linker Searches
![]()
Link Options
![]()
Link Options
![]()
Application
Run-Time Environment Variables
