DLL Programmer's Guide for TNS/E Systems

Advanced DLL Facility Controls
DLL Programmer’s Guide for TNS/E Systems527252-006
5-15
Changing Run-Time Options for C and C++
Programs
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 loaders 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-17.
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. This
means that when the program is run, the program’s stdin, stdout and stderr files will not
be opened automatically and you may thus need to add logic to the program to open
these files.