Building a reentrant C to C++ application

The XL C++ compiler creates reentrant code by default. However, to create a reentrant C to C++ ILC application, you need to follow the following process:

  1. Compile your C++ code.
  2. Compile your C code with the RENT, LONGNAME, and DLL parameters. (LONGNAME and DLL are not required but make the prelinking and linking process simpler.)
  3. Prelink all C++ and C text decks together using the Language Environment prelinker.

    The Prelink step can be eliminated when the target library for the executable module is either the HFS or a PDSE and the DFSMS Binder is used to link all C++ and C text decks together.

  4. Link the text deck created by the prelinker to create your module.

See z/OS Language Environment Programming Guide for more information about reentrant applications.