External data

External data in a C++ routine can be shared with a common block of the same name in a Fortranroutine in the same load module under the following conditions:
  • The C++ static data is declared outside of any functions
  • The C++ external data is declared NORENT by using #pragma variable(var, NORENT). Otherwise, C++ variables are always RENT.
  • The Fortran static common blocks are either used only with one load module in an application or they are declared as private common blocks. A private common block is not shared across load modules and must by created in any of the following ways:
    • Specified or implied by the PC compiler option
    • Referenced by Fortran object code produced by the VS FORTRAN Version 2 Release 4 compiler or earlier
    • In an application that executes with the PC runtime option