Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Setting linkage conventions for COBOL and C/C++

C/C++ and COBOL use different default linkage conventions. For calls between COBOL and C/C++ programs, the linkage convention must be consistent between the called and calling program. You can set the linkage convention for COBOL programs by using COBOL compiler directives or compiler options.

Use the >>CALLINT CDECL compiler directive or CALLINT(CDECL) compiler option for COBOL programs that call Microsoft Visual C++ for Windows functions.

Use the compiler directive when you want to change the linkage convention for a particular call rather than for the entire program.

Use the ENTRYINT(CDECL) compiler option for COBOL programs that are called by Microsoft Visual C++ for Windows functions. This option sets the linkage convention to that of the CDECL linkage convention of Microsoft Visual C++ for Windows. Use the ENTRYINT(OPTLINK) compiler option for COBOL programs that are called by IBM C/C++ for Windows functions.

related references
Compiler-directing statements
Call interface conventions
COBOL and C/C++ data types
CALLINT
ENTRYINT


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)