AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

Should I include "/usr/vacpp/include" or just "/usr/include" in my Include path for compiler

  • 1.  Should I include "/usr/vacpp/include" or just "/usr/include" in my Include path for compiler

    Posted Thu July 26, 2007 01:49 PM

    Originally posted by: SystemAdmin


    When We install a compiler e.g. XLC 8, on our box, a
    whole set of include files get installed in /usr/vacpp/include.

    Now, when I am compiling a c++ program using this compiler,
    should I be first including this directory in my include
    path ( xlc -I/usr/vacpp/include ) explicitly..?

    I trid this and getting some compile errors. These errors
    go away when I do not explicitly include this dir in my
    include path.

    Not sure, if should debug my errors or simply not include
    this directry in my include path..

    Thanks


  • 2.  Re: Should I include "/usr/vacpp/include" or just "/usr/include" in my Include path for compiler

    Posted Fri July 27, 2007 07:41 AM

    Originally posted by: SystemAdmin


    It would help us to respond to your problem if you posted the errors rather than just saying you had "some". By saying the errors "go away" do you mean that the compiler produces an executable that runs as you expect? If so then I'm not sure you really have a problem to solve here. If not perhaps you could tell us what does happen.

    Regards,
    Jim Lane


  • 3.  Re: Should I include "/usr/vacpp/include" or just "/usr/include" in my Include path for compiler

    Posted Fri July 27, 2007 12:45 PM

    Originally posted by: SystemAdmin



    Jim.
    When I say 'go away', I mean that
    the program compiles and runs fine. My question is two-fold.

    1. Should I be explicitly including the include directory
    /usr/vacpp/include and /usr/vac/include in my include path..?

    If the answer is no, then rest of my question has no
    meaning.
    2. If the answer is yes or ok to do, then the errors
    are worth looking into. That's the reason, I did not list
    the errors right away. The sample errors are as shown
    below. Essentially, the define HUGE_VAL has conflicts
    in the math.h in /usr/vac/include and the one
    in /usr/include.

    "/user/devtech/xalan2/c-v1.10/c/src/xalanc/PlatformSupport/DoubleSupport.cpp", line 49.75: 1540-0274 (S) The name lookup for "HUGE_VAL" did not find a declaration.
    "/usr/vac/include/math.h", line 302.11: 1540-2407 (I) The local macro "HUGE_VAL" is not visible in the current source.
    "/user/devtech/xalan2/c-v1.10/c/src/xalanc/PlatformSupport/DoubleSupport.cpp", line 51.76: 1540-0274 (S) The name lookup for "HUGE_VAL" did not find a declaration.
    "/usr/vac/include/math.h", line 302.11: 1540-2407 (I) The local macro "HUGE_VAL" is not visible in the current source.
    gmake[1]: *** http://../../obj/DoubleSupport.o Error 1


  • 4.  Re: Should I include "/usr/vacpp/include" or just "/usr/include" in my Include path for compiler

    Posted Mon July 30, 2007 08:09 AM

    Originally posted by: SystemAdmin


    Given 1) I believe that 2) is irrelevant. If your program compiles and runs without the vacpp headers then don't worry about the error messages.

    FWIW

    Jim Lane