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

Sandro Giessl ceebx at users.sourceforge.net
Sun Apr 11 00:09:11 BST 2004


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.

To see what I'm talking about, create a file test.cpp with just the 
following two includes:
#include <netwm.h>
#include <qvariant.h>

Now try to compile:
g++ -I$KDEDIR/include -I$QTDIR/include -c ./test.cpp -o test.o

You will get hundreds of lines of nonsense like:
In file included from test.cpp:2:
/home/sandro/src/kde/qt-copy/include/qvariant.h:104: error: parse error 
before
   `int'
/home/sandro/src/kde/qt-copy/include/qvariant.h:121: error: missing ';' 
before
   right brace
/home/sandro/src/kde/qt-copy/include/qvariant.h:123: error: parse error 
before
   `)' token
/home/sandro/src/kde/qt-copy/include/qvariant.h:124: error: destructors 
must be
   member functions
/home/sandro/src/kde/qt-copy/include/qvariant.h:125: error: parse error 
before

I'm also CC'ing kde-core-devel as I guess there's something wrong with 
the netwm header...

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




More information about the kde-core-devel mailing list