zballina / lxqt-config-randr

Clone of Randr of System Settings KDE, based solely on Qt libraries
Other
3 stars 6 forks source link

#error qmetatype.h must be included before any header file that defines Bool #7

Open mckaygerhard opened 10 years ago

mckaygerhard commented 10 years ago

i have problem compiling layoutmanager.cpp due some include priorities, see this log:

[ 64%] Building CXX object src/CMakeFiles/lxqt-config-randr.dir/layoutmanager.cpp.o
cd /root/debian/razor-xrandr/compi/src && /usr/bin/c++   -DNDEBUG -DSTR_VERSION=\"0.1.2\" -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NO_DEBUG -Os -DNDEBUG -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/root/debian/razor-xrandr/src -I/root/debian/razor-xrandr/compi/src    -o CMakeFiles/lxqt-config-randr.dir/layoutmanager.cpp.o -c /root/debian/razor-xrandr/src/layoutmanager.cpp
In file included from /usr/include/qt4/QtCore/qvariant.h:48,
                 from /usr/include/qt4/QtGui/qgraphicsitem.h:47,
                 from /usr/include/qt4/QtGui/QGraphicsRectItem:1,
                 from /root/debian/razor-xrandr/src/outputgraphicsitem.h:22,
                 from /root/debian/razor-xrandr/src/layoutmanager.cpp:24:
/usr/include/qt4/QtCore/qmetatype.h:53:2: error: #error qmetatype.h must be included before any header file that defines Bool
mckaygerhard commented 10 years ago

It is better to not include anything before Qt headers. or write some special Qt include wrapper which will undef all possible defines which are breaking Qt includes before including actual Qt includes.

the includes outputgraphicsitem.h layoutmanager.h makes anothers inclusions that puts C headers before QT headers.. that's the problem