Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mckaygerhard opened this issue Mar 12, 2014 · 1 comment · May be fixed by #8
Open

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

mckaygerhard opened this issue Mar 12, 2014 · 1 comment · May be fixed by #8

Comments

@mckaygerhard
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant