DLL Programmer's Guide for TNS/R Systems

Advanced DLL Facility Controls
DLL Programmers Guide for TNS/R Systems522203-002
5-13
Changing Run-Time Options for C and C++
Programs
It is possible to displace a public SRL by providing a DLL of the same name on the
path list ahead of it; the DLL will be loaded and the SRL will not. However, if any other
public SRL in this process utilizes the displaced one, the load fails when the loader
discovers that one of the libraries named on the libList of that other SRL is a DLL. This
is an error; a hybrid public SRL's libList must designate other public SRLs.
Note that the path search order for finding libraries is irrelevant to symbol search order,
which depends upon the searchList order, developed from the libLists.
_RLD_FIRST_LIB_PATH and _RLD_LIB_PATH can be stated only once for loading
each program and its libraries, so you must specify all the desired search paths for
each of these two environmental variables or defines in a list of colon-separated path
names.
You can prevent the loader’s search path for your loadfile from deviating from what you
set up at link time, that is, restrict the loader’s search path to steps 2, 3, 6, and 7
above. You do this by having inserted the -limit_runtime_paths option in the
linker’s command stream; see The Link-Time-Defined Search Path of the Loader on
page 2-16
Changing Run-Time Options for C and C++
Programs
These options are available to you only when linking programs, not DLLs.
When linking a program written in C, if the target platform is OSS, then by default, the
linker sets the program to use the code 180 C text files. But if the target is Guardian,
then by default, it sets the program to use code 101 C text files. If the target is
Guardian and you want the program to use code 180 C text files instead, then insert
-ansistreams option when linking the program.
When linking a program written in C or C++, by default, the linker sets the program to
use the standard C/C++ I/O files. To avoid this setting, insert the -nostdfiles option
when linking the program. -no_stdfiles is a synonym for -nostdfiles.