Not able to #include netwm.h and qvarant.h together

Sandro Giessl ceebx at users.sourceforge.net
Mon Apr 12 16:43:38 BST 2004


Am Sunday 11 April 2004 04:30 schrieb Thiago Macieira:
> Sandro Giessl wrote:
> >Hi,
> >
> >Today I noticed a strange compile error when including qvariant.h.
> > First I thought that there is a problem with my fresh qt-copy but
> > it seems to be a conflict between netwm.h and qvariant.h. I really
> > don't have an idea what's wrong and how to solve this, help is very
> > much appreciated.
>
> Here's why:
>
> netwm.h includes X11/Xlib.h, which has:
> #define Bool int
Strange. :)

> Subsequently, qvariant.h defines enum QVariant::Type containing an
> element called Bool. It gets replaced by "int" and then the compiler
> complains.
>
> Solution:
> #include <fixx11.h>
> after #include <netwm.h>
Ok, thanks for the info. For some reason I don't have the file 
"fixx11.h" installed but in my case it is sufficient to include netwm.h 
after all other includes.

> I'd go even further and suggest netwm.h include it after it's done
> including the X11 namespace-dirty headers.

-- 
Sandro Giessl <ceebx at users.sourceforge.net> | jabber: sandro at jabber.org




More information about the kde-core-devel mailing list