On Wed, 12 Mar 2025 16:44:17 -0500, Charles Mills <[email protected]> wrote:
>Is it just me or does the "new" IBM Open XL C/C++ compiler seem >under-documented? > >(This is in the department of old dogs trying to learn new tricks.) > >I am very, very familiar with the "legacy" IBM z/OS XL C/C++ compiler. (Is it >just me or do these names seem unnecessarily confusing?) > >Where is the Language Reference? Where is the Programming Guide? Where is the >User's Guide? Where are some command line compile examples? > >Yeah, C++ is C++ and there is lots on the Web but I am used to a manual that >says "this is the language exactly as this compiler implements it." > >I'm getting errors on the standard C++ headers. How do I make sense of them? > >In file included from //'CEE.SCEEH(STRING)':75: > >//'CEE.SCEEH(ISTREAM)':19:6: error: This file to be used only with IBM z/OS >C++ V1R2 and later compilers > 19 | # error\ > > | ^ > > >The only real compile example in the doc is for an open (non-PROC) JCL-based >compile. All I have is the UNIX binary. Can I copy it to a PDSE and use that >as a load library? (I know I can in theory with cp -X but can I actually do it >successfully?) > >Charles > >---------------------------------------------------------------------- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to [email protected] with the message: INFO IBM-MAIN Hello, The documentation for the compiler is continually being updated. For the specific example you have, generally you should be using the header files and paths that are given by the install of the compiler. For example, the following file shows how to include the C++ string class: #include <iostream> #include <string> int main() { std::string msg = "Hello, World!"; std::cout << msg << std::endl; return 0; } If compiled and run as follows: > ibm-clang++ cppString.cpp > ./a.out Hello, World! The errors you saw were likely from using the wrong header set. Hope this helps. z/OS XL C/C++ Compiler team ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
