Problem generating dictionary with -I/usr/include

Hi,

I’m having trouble generating a dictionary. This has worked so far but today I decided to add all the include flags. The command ended up being something like:

rootcint -f EventDictionaryDictionary.cc -c -I/home/fastbot/source/EventIO -I/home/fastbot/fastBot/build -I/usr/include ...

I’m using root 5.21/06 and gcc 4.3.0. The error I get is this but it doesn’t happen if I remove /usr/include from the includes:

[quote]#error "You need a ISO C conforming compiler to use the glibc headers"
Error: Missing one of ’

/’ expected at or after line 89.
Error: Unexpected end of file (G__fgetstream():2) /usr/include/sys/cdefs.h:382:
Error: Symbol extern"C"{ # define __need_size_t # define __need_NULL # include<stddef is not defined in current scope /usr/include/stdio.h:45:
Error: Failed to evaluate extern"C"{ # define __need_size_t # define __need_NULL # include<stddef.h> # include<bits/types
Error: Failed to evaluate extern"C"{ # define __need_size_t # define __need_NULL # include<stddef.h> # include<bits/types.h> # define __need_FILE # define __need___FILE #endif #if !defined __FILE_defined&& defined __need_FILE struct _IO_FILE
Error: Symbol __BEGIN_NAMESPACE_STDtypedefstruct_IO_FILEFILE is not defined in current scope /usr/include/stdio.h:49:
Error: Missing one of ‘{’ expected at or after line 91.
Error: Unexpected end of file (G__fignorestream():3) /usr/include/stdio.h:917:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
[/quote]

Hi,

You must not use -I/usr/include; as you see it is fatal for rootcint and it is in almost all case ‘unnecessary’ for the compiler (it usually already knows where its headers and the system headers are located).

Cheers,
Philippe.