Header files dix.h and XKBfile.h have different declarations for NameForAtom function ( see http://cgit.freedesktop.org/xorg/lib/libxkbfile/tree/include/X11/extensions/XKBfile.h ). Also dix.h and /usr/include/string.h have different declarations for ffs() function. These differences cause the following errors (GCC 4.5): In file included from /usr/include/xorg/dixstruct.h:27, from /usr/include/xorg/inputstr.h:54, from /usr/include/X11/extensions/XKBsrv.h:74, /usr/include/xorg/dix.h:515: error: declaration of 'int ffs(int)' throws different exceptions /usr/include/string.h:312: error: from previous declaration 'int ffs(int) throw ()' /usr/include/X11/extensions/XKBfile.h:249: error: new declaration 'char* NameForAtom(Atom)' /usr/include/xorg/dix.h:291: error: ambiguates old declaration 'const char* NameForAtom(Atom)'
Also if compiling with G++: /usr/include/xorg/dix.h:291: error: previous declaration of 'char* NameForAtom(Atom)' with 'C++' linkage /usr/include/X11/extensions/XKBfile.h:249: error: conflicts with new declaration with 'C' linkage
XKBfile.h is a client-side, not server-side header, so you'll have many clashing definitions anyway. You cannot include any client-side and server-side headers together at all. Among other things, the definition of CARD32 differs between client and server code on 64-bit systems, and many other clashes. I don't think we support C++ server modules anyway: I guess you just need more extern "C" { } wrapping. What were you trying to do with XKBfile.h, out of interest?
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.