[odb-users] bug with Qt 5.2.0-beta

abbas ali chezgi chezgi at yahoo.com
Mon Nov 25 06:15:02 EST 2013


thanks Boris,problem solved.
it seems that odb only needs QtCore
is there any need to use module based includes?
we can refactor Qt includes to simple case:
  QtCore/QString ---> QString

thanks.




On Monday, November 25, 2013 1:05 PM, Boris Kolpackov <boris at codesynthesis.com> wrote:
 
Hi,

abbas ali chezgi <chezgi at yahoo.com> writes:

> odb -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore

ODB includes Qt headers with the QtCore prefix, for example:

#include <QtCore/QString>

As a result, you need to also specify the "top-level" include
directory for Qt with the -I option:

odb -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore

What most likely happens now is you get some headers from your
Qt 5.2.0 beta and some from your default Qt installation. Not
a good thing.

If this help with the ODB compilation, I suggest that you also
make sure that libodb-qt is built with both include directories.

If this doesn't help, try to compile this test with g++ and see
if you can make it work with Qt 5.2.0:

#include <QObject>
#include <QString>
#include <QVariant>
int main () {}


Boris


More information about the odb-users mailing list