Qt World Summit: Register Today!

Q_INT32 no such file or directory

  • Hello QT community,

    I have this line of code that makes error on build:

    #include <Q_INT32>

    error is: Q_INT32 no such file or directory

    What do I need to do?

  • Why do you assume you need to #include this?

    Just #include <QtGlobal> and use qint32. QtGlobal is included automatically by any other Qt include I think, but you can also include it explicitly.

  • My mentor made code and I'm studing it now.

    After modifying code and adding #include <QtGloabal> I get this error:

    QString strfile = QString::fromAscii(fileba);

    I think that #include <Q_INT32> solves this error.

  • Q_INT32 is a macro, not a file you can include. It is a leftover from Qt 3. For Qt 4 and up, it is recommended to use qint32 instead.

    And no, your include does not solve anything. It just makes your compile have an error before the one you're seeing if you do use qint32 instead.

  • Thank you Andre. I will go on with lesson.

Log in to reply