Declaration for COBOL calling C++ (extern "C")


COBOL program C++ function
ID DIVISION.
PROGRAM-ID. COBPROG.
WORKING-STORAGE SECTION.
01 P1 PIC S9(9) USAGE IS BINARY.
PROCEDURE DIVISION.
CALL 'CPLUSF' USING BY VALUE P1.
GOBACK.
extern "C" {
  void CPLUSF( int p1 );
}
void CPLUSF( int parm ) {
  printf("parm=%d\n");
}