C/C++

C/C++

C/C++

Your one-stop destination to learn and collaborate about the latest innovations in IBM C/C++ for z/OS compilers to develop high-performing C/C++ applications and system programs on z/OS while maximizing hardware use and improving application performance.

 View Only
  • 1.  Z/os C++ compilation not recognizing COUT/CIN

    Posted Thu October 19, 2017 04:09 AM

    Hello,

     

    We are trying to implement the C++ development and compilation in Z/os for our project.

    In my basic C++ program, during compilation through CCNDRVR, it is not recognizing the cout/cin statements

    Even though I use CXX parameter option during the compilation , below errors are thrown in the IEWL link edit step. Any Idea how to resolve this, let me know if you need more information. Fyi, am using coprorcessor for compilation and link edit.

     

    IEW2689W 4C40 DEFINITION SIDE FILE IS NOT DEFINED.
    IEW2456E 9207 SYMBOL _Toupper UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.
    IEW2456E 9207 SYMBOL _Tolower UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.
    IEW2456E 9207 SYMBOL _Getctype__FPCc UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.
             DESIGNATED CALL LIBRARY. NAME SPACE = 3
    IEW2456E 9207 SYMBOL _Cltab__Q4_3std7_EBCDIC8_LFS_OFF5ctypeXTc_ UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE
             DESIGNATED CALL LIBRARY.
    IEW2456E 9207 SYMBOL __dt__Q4_3std7_EBCDIC8_LFS_OFF8_LocinfoFv UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE
             DESIGNATED CALL LIBRARY.
    IEW2456E 9207 SYMBOL __ct__Q4_3std7_EBCDIC8_LFS_OFF8_LocinfoFPCc UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE
             DESIGNATED CALL LIBRARY.
    IEW2456E 9207 SYMBOL clear__Q4_3std7_EBCDIC8_LFS_OFF8ios_baseFib UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE
             DESIGNATED CALL LIBRARY. NAME SPACE = 3
    IEW2456E 9207 SYMBOL _Id_cnt__Q5_3std7_EBCDIC8_LFS_OFF6locale2id UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE
             DESIGNATED CALL LIBRARY.
    IEW2456E 9207 SYMBOL _Getfacet__Q4_3std7_EBCDIC8_LFS_OFF6localeCFUi UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE
             DESIGNATED CALL LIBRARY. NAME SPACE = 3
    IEW2456E 9207 SYMBOL id__Q4_3std7_EBCDIC8_LFS_OFF5ctypeXTc_ UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE
             DESIGNATED CALL LIBRARY. NAME SPACE = 3
    IEW2456E 9207 SYMBOL _Nolock_on_input__Q3_3std7_EBCDIC8_LFS_OFF UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE
             DESIGNATED CALL LIBRARY. NAME SPACE = 3
    IEW2456E 9207 SYMBOL _Nolock_on_output__Q3_3std7_EBCDIC8_LFS_OFF UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE
    IEW2456E 9207 SYMBOL __dt__Q2_3std7_LockitFv UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.
    IEW2456E 9207 SYMBOL __ct__Q2_3std7_LockitFi UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.
             LIBRARY. NAME SPACE = 3
    IEW2456E 9207 SYMBOL cin__Q3_3std7_EBCDIC8_LFS_OFF UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL
             LIBRARY. NAME SPACE = 3
    IEW2456E 9207 SYMBOL cout__Q3_3std7_EBCDIC8_LFS_OFF UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL
    IEW2322I 1220  1     INCLUDE OBJECT(COUT)
    IEW2278I B352 INVOCATION PARAMETERS - AMODE=31,MAP,RENT,LIST,XREF, DYNAM=DLL,CASE=MIXED
    BATCH EMULATOR  JOB(TESTCPPC) STEP(TESTCPP ) PGM= IEWL      PROCEDURE(LKED    )
    z/OS V2 R1 BINDER     02:27:48 THURSDAY OCTOBER 19, 2017

    Jeeva_S35


  • 2.  Re: Z/os C++ compilation not recognizing COUT/CIN

    Posted Thu October 19, 2017 09:20 AM

    Not sure what is "coprorcessor" you are referring to, but the link errors you are gettign indicate that you do not have proper libraries in your link step. I suggest experimenting with the C++ compiler invocation in UNIX System Serivices which if properly installed will allow you to determine which data sets need to be used in the link step if you are using JCL. To get the information about what data sets are used you can invoke the compiler with xlC -v ... ?.C command and observe the pseudo jcl that this command will produce for the link step.

    dinoxlc


  • 3.  Re: Z/os C++ compilation not recognizing COUT/CIN

    Posted Thu October 19, 2017 12:09 PM

    hi, am using MVS JCL for compiling and linking the cpp code. I do not want to invoke the unix compiler since our goal is to achieve it through MVS applications.

    within IEWL JCL my STEPLIB libraries that am using are below,

    SYS1.SCEERUN2
    SYS1.SCEERUN

    SYSLIB system libraries below,

    SYS1.SCEELKEX
    SYS1.SCEELKED
    SYS1.SCEECPP
    SYS1.SCEEBND2

    Apart from this through parameter options SE(//'SYS1.SCEEH.+','SYS1.SCLBH.+') is enabled as well.. Still basic cout/cin which is part of iostream is not working.

     

    Thanks

    Jeeva_S35


  • 4.  Re: Z/os C++ compilation not recognizing COUT/CIN

    Posted Thu October 19, 2017 01:05 PM

    The suggestion to try invoking the compiler from UNIX System Serivces was meant as a way for you to discover the proper way to invoke the link step. The alternative is to take a look at 'hlq.SCCNPRC(CBCCB)' JCL procedure that shipes with the compiler and compare your JCL to the procedure. Pay attention to the procedure variable STDLIBSD which is by default C128, but if you are not using XPLINK option then you need to use C128N instead. 

    dinoxlc