[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[programming] wchart_t definition conflicting in Xlib.h a nd stdd ef.h



Hi,

This is most than likely an FAQ, looking at the Web and groups, but no real
answer/solution so far.


I have the following error while compiling my app:

/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include/stddef.h:325: conflicting
types for `wchar_t'
/usr/include/X11/Xlib.h:78: previous declaration of `wchar_t'


My compiler:

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux Thread model: posix gcc version 3.2.3 20030502 (Red
Hat Linux 3.2.3-52)

I have the same error with GNU GCC 3.3.2


My Xfree:

$ rpm -qf /usr/include/X11/Xlib.h
XFree86-devel-4.3.0-81.EL


My Linux:

$ uname -a
Linux kenobi 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT 2005 i686
i686 i386 GNU/Linux


I have well read in Xlib.h

#ifndef X_WCHAR
#include <stddef.h>
#else
#ifdef __UNIXOS2__
#include <stdlib.h>
#else
/* replace this with #include or typedef appropriate for your system */
typedef unsigned long wchar_t;
#endif
#endif


However, I am very reluctant in modifying a delivered include file. Since
the appearance of the problem (I have read cases dated before 2000 !), is
there any cleaner way available ?

In the case I have to edit Xlib.h, shall I replace the typedef by an
#include to stddef.h ?

Thanks in advance!

JC.
____

This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]