TNS/R Native Application Migration Guide
User Library Migration Tasks
TNS/R Native Application Migration Guide—523745-001
6-2
Building a User Library
2. Add pragmas and directives:
•
In C and C++, add an SRL pragma to the compiler RUN command line or
specify the native c89 -Wsrl flag.
•
In COBOL85, add a UL directive to the compiler RUN command line or the
source code.
•
In pTAL, add an SRL directive to the compiler RUN command line or the
source code.
3. Compile the source files as relinkable files, not as executable files. Do not specify
the COBOL85 RUNNABLE directive or the C/C++ RUNNABLE pragma.
4. Link the object files using nld with a -ul flag. The -ul flag causes nld to link the
object files into an executable library program file. If the user library calls functions
in an SRL, you must specify the SRL when linking. Do not link the CRTLMAIN file
(in the Guardian environment) or the crtlmain.o file (in the OSS environment
and on the PC as a part of ETK or TDS) to a user library.