Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Q_INT32 no such file or directory
Forum Updated to NodeBB v4.3 + New Features

Q_INT32 no such file or directory

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Ever
    wrote on last edited by
    #1

    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?

    The roots of education are bitter, but the fruit is sweet.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • E Offline
        E Offline
        Ever
        wrote on last edited by
        #3

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

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

        QTextCodec::setCodecForCStrings(QTextCodec::codecForName("Windows-1250"));
        QString strfile = QString::fromAscii(fileba);

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

        The roots of education are bitter, but the fruit is sweet.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • E Offline
            E Offline
            Ever
            wrote on last edited by
            #5

            Thank you Andre. I will go on with lesson.

            The roots of education are bitter, but the fruit is sweet.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved