Using IBM C/C++ compilers with IBM Open Enterprise SDK for Python
This section introduces multiple compilers that you can use with IBM® Open Enterprise SDK for Python 3.13 and how to use them properly.
C/C++ compilers available on z/OS
It is recommended to use either IBM C/C++ for Open Enterprise Languages on z/OS® 2.0 or IBM Open XL C/C++ 2.1 for z/OS because they provide the highest compatibility with PyPI packages. The following list provides the download address for each C/C++ compiler:
- IBM C/C++ For Open Enterprise Languages on z/OS 2.0 (recommended)
- IBM Open XL C/C++ 2.1 z/OS (recommended)
- IBM z/OS XL C/C++
Build packages with setuptools
setuptools with a given compiler, set the
following environment variables:export CC=<path_to_c_compiler>
export CXX=<path_to_cxx_compiler>
export LDSHARED=<path_to_c_compiler>
Determining if you have a C/C++ Compiler
#include <stdio.h>
int main()
{
printf("Hello, world!\n");
return 0;
}
<path_to_your_c_compiler> <filename.c>
./a.out
If it runs successfully, the program will output Hello, world! which means your compiler is ready for use by IBM Open Enterprise SDK for Python.
If it fails, access the C/C++ compilers download addresses in C/C++ compilers available on z/OS section in this chapter and install the compiler.
Recommended Configuration for IBM z/OS XL C/C++
export _CC_CCMODE=1
export _CXX_CCMODE=1
export _C89_CCMODE=1
export _CC_EXTRA_ARGS=1
export _CXX_EXTRA_ARGS=1
export _C89_EXTRA_ARGS=1FSUM3010 Specify a file with the correct suffix (.C, .hh, .i, .c, .i, .s, .o, .x, .p, .I, or .a), or a corresponding data set nameTroubleshooting on using IBM z/OS C/C++ Compilers
For more information about troubleshooting C/C++ compilers, see IBM z/OS C/C++ Failures.