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. Why do I get qmake 4.8 in Qt5.0.1 ?
Forum Updated to NodeBB v4.3 + New Features

Why do I get qmake 4.8 in Qt5.0.1 ?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 5 Posters 4.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.
  • O Offline
    O Offline
    Oxymoron
    wrote on last edited by
    #1

    Hi,
    I downloaded and installed Qt5.0.1 for linux64. However the qmake I got is version 4.8? It's causing problems like

    error: #error "This file was generated using the moc from 4.8.1. It"
    error: #error "cannot be used with the include files from this version of Qt."

    Does anyone have the same problem? Where can I get qmake 5.0? Any help is appreciated.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      When you type:
      @
      qmake
      @

      the system uses a PATH to find an executable called "qmake" and it runs the first one it finds. In your case this is likely to be the system version of Qt... Qt 4.8. Type:
      @
      which qmake
      @

      to see what I mean. Either put the Qt 5.0.1 bin directory in earlier in the path than whatever directory (probably /usr/bin) contains the Qt 4.8 version of qmake, or deliberately spell out the full location of the qmake tyou want to run:
      @
      /whatever/the/path/is/Qt5.0.1/bin/qmake
      @

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Violet Giraffe
        wrote on last edited by
        #3

        If you use Qt Creator, you can select a desired kit. No manual work is needed then.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tzander
          wrote on last edited by
          #4

          I think the question you ask does not match the error message you post.

          The error indicates you have a header file that moc from 4.8 generated that you try to compile.

          You need to make sure all the moc files are regenerated. Try a 'make clean'

          1 Reply Last reply
          0
          • JeroentjehomeJ Offline
            JeroentjehomeJ Offline
            Jeroentjehome
            wrote on last edited by
            #5

            Otherwise through away the entire "debug and release" directories. Then do a qmake build (this will as Thomas indicated) to regenerate all desired files.
            That should do the trick.

            Greetz, Jeroen

            1 Reply Last reply
            0
            • O Offline
              O Offline
              Oxymoron
              wrote on last edited by
              #6

              Thank you very much, guys. The problem is indeed as Chris suggested, that I have another qmake in /usr/bin, which is version 4.8. And when I call qmake, this qmake 4.8 generates the moc files.

              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