View Single Post

   
  #3 (permalink)  
Old 01-05-2008, 12:33 PM
MK
 
Posts: n/a
Default Re: xlC version 8 file inclusion errors when using -I option

On Apr 5, 1:47 am, "Derek E. Lewis" <dele...@acm.org> wrote:
> On Tue, 3 Apr 2007, MK wrote:
> > Hi,

>
> > We've upgraded from the Visual Age version 6 compiler to XLC/C++ 8.
> > The compiler works ok when all source is in the same directory and the
> > -I option is not specified. Once using the -I option I get errors such
> > as those below regardless of whether using the C (xlc) or C++ (xlC)
> > compiler. We didn't encounter such errors with VA 6, so any help is
> > much appreciated.

>
> This may be a long shot, but I suspect VAC is expecting C99-compliant
> includes, and depending on the version of AIX you're using, you may not
> have C99-compliant includes. I've seen this a lot between AIX and Solaris,
> especially older releases of each respective operating system. Try kicking
> VAC into a non-C99 mode (C89, etc.).
>
> Derek E. Lewis
> delewis at acm.orghttp://delewis.blogspot.com


Hi Derek,

Thanks for the reply. I don't think this is the problem though. I
modified the compiler options from

xlc -c decNumber.c -I../include

which causes the above errors, to the following which works fine

xlc -c decNumber.c -I/usr/include -I/usr/vac/include -I../include

Why would the 2nd command work but the 1st not. My understanding is
that the compiler should have a default system include path.

Anyway, this is related to C compilation. Moving on to C++. I tried
adding the include paths for C++ code but still the same problems. I
tried all invocations or aliases of the compiler, those you mentioned
and everything else in the bin directory but still no go. I'm
currently looking at the compiler options, but cannot see anything
that I need to change. As I previously stated, the default compiler
configuration file looks ok, but I may be wrong.

Regards,

Michael

Reply With Quote