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

Thiago Macieira thiago.macieira at kdemail.net
Sun Apr 11 03:30:06 BST 2004


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

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>

I'd go even further and suggest netwm.h include it after it's done 
including the X11 namespace-dirty headers.
-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiago (AT) macieira (DOT) info
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040410/43b9e0d1/attachment.sig>


More information about the kde-core-devel mailing list