Topic
  • 1 reply
  • Latest Post - ‏2013-01-16T18:16:37Z by flodstrom
SystemAdmin
SystemAdmin
549 Posts

Pinned topic XLC++ compiler complaining

‏2013-01-15T12:16:51Z |
Hi,

When I compile a CPP file which includes iostream, I get errors like:
"/usr/vacpp/include/iostream", line 14.1: 1506-224 (I) Incorrect pragma ignored.
"/usr/vacpp/include/iostream", line 30.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
"/usr/vacpp/include/iostream", line 44.1: 1506-224 (I) Incorrect pragma ignored.
"/usr/vacpp/include/iostream", line 49.3: 1506-224 (I) Incorrect pragma ignored.
"/usr/vacpp/include/istream", line 14.1: 1506-224 (I) Incorrect pragma ignored.
"/usr/vacpp/include/istream", line 30.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
"/usr/vacpp/include/istream", line 44.1: 1506-224 (I) Incorrect pragma ignored.
"/usr/vacpp/include/istream", line 49.3: 1506-224 (I) Incorrect pragma ignored.
"/usr/vacpp/include/ostream", line 14.1: 1506-224 (I) Incorrect pragma ignored.
"/usr/vacpp/include/ostream", line 30.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers

The version of the installed compilers is as follows:
yashg ~/yash>lslpp -L | grep vac
vac.Bnd 12.1.0.0 C F XL C for AIX Media Defined
vac.C 12.1.0.0 C F IBM XL C Compiler
vac.aix53.lib 12.1.0.0 C F XL C for AIX Libraries for AIX
vac.html.common.search 12.1.0.0 C F Supersede entry, not installed
vac.html.en_US.C 12.1.0.0 C F Supersede entry, not installed
vac.html.ja_JP.C 12.1.0.0 C F Supersede entry, not installed
vac.html.zh_CN.C 12.1.0.0 C F Supersede entry, not installed
vac.include 12.1.0.0 C F IBM XL C Compiler Include
vac.lib 12.1.0.0 C F XL C for AIX Libraries
vac.man.en_US 12.1.0.0 C F IBM XL C Compiler Man
vac.ndi 12.1.0.0 C F XL C for AIX Non-Default
vac.pdf.en_US.C 12.1.0.0 C F XL C for AIX Compiler
vacpp.Bnd 12.1.0.0 C F IBM XL C/C++ Media Defined
vacpp.cmp.aix53.lib 12.1.0.0 C F IBM XL C/C++ Libraries for AIX
vacpp.cmp.aix53.tools 12.1.0.0 C F IBM XL C/C++ Tools for AIX 5.3
vacpp.cmp.core 12.1.0.0 C F IBM XL C/C++ Compiler
vacpp.cmp.include 12.1.0.0 C F IBM XL C/C++ Compiler Include
vacpp.cmp.lib 12.1.0.0 C F IBM XL C/C++ Libraries
vacpp.cmp.rte 12.1.0.0 C F IBM XL C/C++ Compiler
vacpp.cmp.tools 12.1.0.0 C F IBM XL C/C++ Tools
vacpp.html.common 12.1.0.0 C F Supersede entry, not installed
vacpp.html.en_US 12.1.0.0 C F Supersede entry, not installed
vacpp.html.ja_JP 12.1.0.0 C F Supersede entry, not installed
vacpp.html.zh_CN 12.1.0.0 C F Supersede entry, not installed
vacpp.man.en_US 12.1.0.0 C F IBM XL C/C++ Compiler Man
vacpp.memdbg.aix53.lib 12.1.0.0 C F IBM XL C/C++ User Heap/Memory
vacpp.memdbg.aix53.rte 12.1.0.0 C F IBM XL C/C++ User Heap/Memory
vacpp.memdbg.lib 12.1.0.0 C F IBM XL C/C++ User Heap and
vacpp.memdbg.rte 12.1.0.0 C F IBM XL C/C++ User Heap and
vacpp.ndi 12.1.0.0 C F IBM XL C/C++ Non-Default
vacpp.pdf.en_US 12.1.0.0 C F IBM XL C/C++ Documentation
vacpp.samples.ansicl 12.1.0.0 C F IBM XL C/C++ Compiler ANSI
vacpp.tnb 12.1.0.0 C F IBM XL C/C++ Evaluation

Apparently iostream has checks such as:
  1. if __IBMCPP__ < 400

This macro is not listed when I run a command to see all predefined macros:
yashg ~/yash>xlC -qshowmacros -P b.cpp
yashg ~/yash>
No macros are listed.

I tried xlC, xlc++ and xlc++_r7 and had the same issue.

yashg ~/yash>xlc++_r7 -qversion
IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72)
Version: 12.01.0000.0000

What may be the issue?

Thanks,
Yash
Updated on 2013-01-16T18:16:37Z at 2013-01-16T18:16:37Z by flodstrom
  • flodstrom
    flodstrom
    57 Posts

    Re: XLC++ compiler complaining

    ‏2013-01-16T18:16:37Z  
    Perhaps something in your code?

    Usually these kind of problems can occur when a system defined variable, macro, etc. is redefined by accident by the user.