Qt Error qmetatype.h

I want to add “C” header to C++ header (Qt). The contents of my C++ header is :

#include  ... //c header
#include  ... //c header
#include  ... //c++/Qt header
#include ...  //c++/Qt header
#include  ... //c++/Qt header

when I try to compile this code, I have error message :

/usr/include/qt4/QtCore/qmetatype.h:53:2: error: #error qmetatype.h must be included before any header file that defines Bool.

To solve this problem, we must put C definiton header below C++ header. So, my C++ header become :

#include  ... //c++/Qt header
#include ...  //c++/Qt header
#include  ... //c++/Qt header
#include  ... //c header
#include  ... //c header
One Comment

Leave a Reply to arkdaru Cancel reply

Your email address will not be published. Required fields are marked *