By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,320 Members | 2,109 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,320 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
# /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.
Nov 13 '05 #2

P: n/a
>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
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.