Topic
1 reply Latest Post - ‏2010-03-30T17:21:41Z by camorton
SystemAdmin
SystemAdmin
196 Posts
ACCEPTED ANSWER

Pinned topic Getting "1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers" error message with xlC compiler on AIX 5.3

‏2010-03-30T11:00:28Z |

Hi,
I am getting the below error message when I try to compile my C++ code on AIX 5.3 with xlC v8.0 compiler. Does anybody has any idea how to resolve this error?
"/usr/vacpp/include/iosfwd", line 32.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
"/usr/vacpp/include/cstdio", line 26.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
"/usr/vacpp/include/cstring", line 26.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
"/usr/vacpp/include/cwchar", line 26.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
"/usr/vacpp/include/ansic_aix.h", line 6.4: 1506-205 (S) #error "Obsolete header file, please stop using it, or define OLD_ANSIC_AIX_VERSION macro to invoke it"
"/usr/vacpp/include/xstddef", line 26.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
"/usr/vacpp/include/cstddef", line 26.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
"/usr/vacpp/include/string", line 32.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
Thanks in advance,
Sharan

Updated on 2010-03-30T17:21:41Z at 2010-03-30T17:21:41Z by camorton
  • camorton
    camorton
    10 Posts
    ACCEPTED ANSWER

    Re: Getting "1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers" error message with xlC compiler on AIX 5.3

    ‏2010-03-30T17:21:41Z  in response to SystemAdmin

    The header file has a check for the macro that should be predefined for the compiler version you are using
    if __IBMCPP__ < 400<br />
    1. error\
    This file to be used only with IBM VisualAge C++ v4 and later compilers
    1. endif /* __IBMCPP__ < 400 */
    Could you try a test that prints the value of this macro and see what its set to?
    For example if I use this testcase
    extern "C" void printf(char *,...);

    int main(void)
    {

    printf("__IBMCPP__ %d\n", __IBMCPP__ );
    return 0;
    }
    then compile it and run it on V8 I get
    __IBMCPP__ 800
    If you are using V8 the #error should not be issued, so there must be some problem with the macro?