On 30/1/23 07:31, Joseph Reichman wrote:
Please accept my apologies the program consisted of hundreds of lines which
I complied cleanly using Visual studio.
Obviously, there are difference not in ANSI C++ which I Think XL is at 20
but in the window types.
There are three IBM C/C++ compiler products that run on z/OS. XL C/C++
is practically moribund. XL C++ implements a small subset of C++11 such
as R-value references but not the standard library. That's what you're
using as it's the only compiler with a JCL batch interface. All the
others ship z/OS UNIX binaries only. You can still compile programs in
PDS libraries but nobody in their right minds would want to do that in
2023.
xlclang/xlclang++ is a Clang/LLVM front end to the XL C++ back-end. It
implements the C11 and C++14 standards. It's 64-bit only.
Open XL C/C++ is a full blown port of Clang/LLVM and has partial support
for C++20 https://clang.llvm.org/cxx_status.html.
To make the program compatible with types like DWORD I added typedef due to
my oversight I forgot to end one with a semi colon which was right before
the includes which caused one long error.
Hope I didn't waste any one time.
The only person whose time you're wasting is your own by using the wrong
compiler (and IDE). Why are you pulling in all of the Windows API header
file crap? Visual Studio Community is an amazing product for writing
Windows programs in a multitude of languages but it's complete overkill
for editing a program to be run on z/OS. If you really must use VS then
configure it to use clang/LLVM
https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-170.
You will then have a standard C/C++ environment without all the Windows
garbage. Extra features such as clang-tidy will lint your code for
errors as you type. My advice is to ditch VS for the much lighter weight
VS Code which supports more languages and is designed from the get-go to
be cross-platform.
Thanks you.
From: reichman...@gmail.com <reichman...@gmail.com>
Sent: Wednesday, January 25, 2023 2:28 PM
To: 'IBM Mainframe Discussion List' <IBM-MAIN@LISTSERV.UA.EDU>
Subject: XL C\C+ strange compile errors
Hi
I have a very short C++ program compiling as /CXX which all it does is
basically open a file
I am getting a whole slew of errors but they are not from my program they
are standard includes CEE.SCEEH.H(STDDEF) and in fact I didn't explicitly
include them (maybe they got included by 2 includes that I included in my
program of <string> and <map>
Thing is I don't know why I am getting these errors they would seem to be
okay for C++ such as "extern" and size_t
Here is a screen shot of some of the errors
"//'CEE.SCEEH.H(STDDEF)'", line 39.4: CCN5063 (S) The text "extern" is
unexpecte"
"//'CEE.SCEEH.H(STRING)'", line 119.51: CCN5063 (S) The text "size_t" is
unexpec"
"//'CEE.SCEEH.H(STRING)'", line 120.54: CCN5063 (S) The text "size_t" is
unexpec"
"//'CEE.SCEEH.H(STRING)'", line 121.60: CCN5063 (S) The text "size_t" is
unexpec"
"//'CEE.SCEEH.H(STRING)'", line 122.45: CCN5063 (S) The text "size_t" is
unexpec"
"//'CEE.SCEEH.H(STRING)'", line 125.14: CCN5040 (S) The text "__strlen" is
unexpa
ambiguous.
"
"//'CEE.SCEEH.H(STRING)'", line 130.58: CCN5063 (S) The text "size_t" is
unexpec"
"//'CEE.SCEEH.H(STRING)'", line 131.58: CCN5063 (S) The text "size_t" is
unexpec"
"//'CEE.SCEEH.H(STRING)'", line 132.64: CCN5063 (S) The text "size_t" is
unexpec"
"//'CEE.SCEEH.H(STRING)'", line 144.51: CCN5063 (S) The text "size_t" is
unexpec"
"//'CEE.SCEEH.H(STRING)'", line 146.57: CCN5063 (S) The text "size_t" is
unexpec"
"//'CEE.SCEEH.H(STRING)'", line 148.43: CCN5063 (S) The text "size_t" is
unexpec"
Here is partial list of my compile JCL
***************************** Top of Data *****************************
//JOER$ JOB 'ADCD V2R9','SYSPROG',NOTIFY=&SYSUID,REGION=0M
//*
//*-------------------------------------------------------------------
//* COMPILE STEP:
//*-------------------------------------------------------------------
//COMPILE EXEC PGM=CCNDRVR,REGION=192M,PARM=('/CXX LIST,OBJ,DEBUG(FORMA
// T(DWARF),HOOK(LINE,NOBLOCK,PATH),SYMBOL,FILE(OPENFIL))')
//STEPLIB DD DSN=CEE.SCEERUN2,DISP=SHR
// DD DSN=CBC.SCCNCMP,DISP=SHR
// DD DSN=CEE.SCEERUN,DISP=SHR
Not sure why I am these are errors
If anyone can point me in the right direction would appreciate it
Thanks
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN