compilation error /usr/include/_G_config.h:29: parse error before "__mbstate_t"

Discussion in 'C Programming' started by Vittal, Jul 8, 2003.

  1. Vittal

    Vittal Guest

    Hello All,

    I am trying to compile my application on Red Hat Linux 8 against gcc
    3.2.2.

    Very first file in application is failing to compile. I tried
    compiling my application on Linux 7.2 against gcc 3.1 and it got build
    without any problems.
    However on against gcc 3.2.2 I hitting this error:

    gcc -DNULL="((void *)0)" -O2 -c -fPIC -D_UNIX_ -Dlinux_i32
    -Dlinux_ia64 -DNEED_XMU -DX_USEBFUNCS -Dindex=strchr -DULONGDEFINED
    -DUNCHARDEFINED -DWIN32_LEAN_AND_MEAN -D_REENTRANT -D_MT -D_BSD_SOURCE
    -I/usr/include -I../wininc -I.. -I../include
    -I/vobs/windu/win32/../../btiutil -D_INCLUDE_XOPEN_SOURCE_EXTENDED
    -D_XOPEN_SOURCE_EXTENDED wuerror.c -o linux_ia64/wuerror.o


    In file included from /usr/include/libio.h:32,
    from
    /usr/gcc3.2.2/lib/gcc-lib/ia64-unknown-linux-gnu/3.2.2/include/stdio.h:74,
    from wuerror.c:55:
    /usr/include/_G_config.h:29: parse error before "__mbstate_t"
    /usr/include/_G_config.h:34: parse error before "__mbstate_t"
    In file included from /usr/include/_G_config.h:44,
    from /usr/include/libio.h:32,
    from
    /usr/gcc3.2.2/lib/gcc-lib/ia64-unknown-linux-gnu/3.2.2/include/stdio.h:74,
    from wuerror.c:55:
    /usr/include/gconv.h:158: parse error before "__mbstate_t"
    /usr/include/gconv.h:164: parse error before '}' token
    /usr/include/gconv.h:172: field `__data' has incomplete type

    However I tried to reproduce the problem in a small C program, but
    could not.

    Can somebody help me or direct me to the path to solve this problem.

    Any help is greatly appreciated.

    Thanks
    -Vittal
     
    Vittal, Jul 8, 2003
    #1
    1. Advertising

  2. Vittal

    Derk Gwen Guest

    # /usr/include/gconv.h:158: parse error before "__mbstate_t"
    # /usr/include/gconv.h:164: parse error before '}' token
    # /usr/include/gconv.h:172: field `__data' has incomplete type

    Probability that anything in /usr/include is bad is very close to zero. Usually
    errors attributed to an included file are really errors before the #include,
    such as a missing semicolon or a #define of a name the included file had
    reserved unto itself.

    --
    Derk Gwen http://derkgwen.250free.com/html/index.html
    So basically, you just trace.
     
    Derk Gwen, Jul 8, 2003
    #2
    1. Advertising

  3. >In file included from /usr/include/libio.h:32,
    > from
    >/usr/gcc3.2.2/lib/gcc-lib/ia64-unknown-linux-gnu/3.2.2/include/stdio.h:74,
    > from wuerror.c:55:
    >/usr/include/_G_config.h:29: parse error before "__mbstate_t"
    >/usr/include/_G_config.h:34: parse error before "__mbstate_t"
    >In file included from /usr/include/_G_config.h:44,
    > from /usr/include/libio.h:32,
    > from
    >/usr/gcc3.2.2/lib/gcc-lib/ia64-unknown-linux-gnu/3.2.2/include/stdio.h:74,
    > from wuerror.c:55:
    >/usr/include/gconv.h:158: parse error before "__mbstate_t"
    >/usr/include/gconv.h:164: parse error before '}' token
    >/usr/include/gconv.h:172: field `__data' has incomplete type


    Failure to compile due to syntax errors in system include files
    often indicate a failure to include a prerequesite include file
    beforehand. The syntax error is often something that should
    be a typedef but isn't. __mbstate_t looks like a name for
    a typedef. For example, in UNIX programs, you commonly need
    to include <sys/types.h> before including anything of the form
    <sys/*.h>.

    Note that from the file paths given, <stdio.h> is an entirely
    different file for the two versions of GCC.


    Gordon L. Burditt
     
    Gordon Burditt, Jul 8, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Salerno
    Replies:
    30
    Views:
    2,001
    Stephan Kuhagen
    Aug 10, 2006
  2. Yves Dorfsman

    #!/usr/bin/env python vs. #!/usr/bin/python

    Yves Dorfsman, May 2, 2008, in forum: Python
    Replies:
    27
    Views:
    2,042
    Tim Roberts
    May 10, 2008
  3. TsanChung
    Replies:
    4
    Views:
    1,249
    TsanChung
    Sep 21, 2008
  4. shankha
    Replies:
    0
    Views:
    715
    shankha
    May 5, 2009
  5. anne001
    Replies:
    1
    Views:
    520
Loading...

Share This Page