Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QMake doesn't work properly
Forum Updated to NodeBB v4.3 + New Features

QMake doesn't work properly

Scheduled Pinned Locked Moved Solved Installation and Deployment
qmakemakemakefile
18 Posts 6 Posters 4.8k Views 4 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.
  • J Johnnyk91
    12 Oct 2020, 18:15

    @SGaist By running the command

    qmake -v
    

    I get this

    QMake version 3.1
    Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu
    

    @Christian-Ehrlicher By running the command

    qmake -d <foo>
    

    I get this

    bash: syntax error near unexpected token `newline'
    
    C Offline
    C Offline
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on 12 Oct 2020, 18:28 last edited by
    #9

    @Johnnyk91 said in QMake doesn't work properly:

    qmake -d <foo>

    I get this
    bash: syntax error near unexpected token `newline'

    You did not really put 'qmake -d <foo>' into your command line and wondered that it did not work? Do you???

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

    J 1 Reply Last reply 12 Oct 2020, 18:37
    1
    • C Christian Ehrlicher
      12 Oct 2020, 18:28

      @Johnnyk91 said in QMake doesn't work properly:

      qmake -d <foo>

      I get this
      bash: syntax error near unexpected token `newline'

      You did not really put 'qmake -d <foo>' into your command line and wondered that it did not work? Do you???

      J Offline
      J Offline
      Johnnyk91
      wrote on 12 Oct 2020, 18:37 last edited by
      #10

      @Christian-Ehrlicher I don't know what you mean but I tried

      qmake -d
      

      and I got a lot of lines starting with DEBUG 1

      1 Reply Last reply
      0
      • J Johnnyk91
        12 Oct 2020, 17:53

        @jsulm Hi

        I've just checked with

        sudo dpkg --list
        

        and it is installed.

        I've also found the directory with the Qt Headers QApplication, QObject, etc...

        K Offline
        K Offline
        kshegunov
        Moderators
        wrote on 12 Oct 2020, 18:43 last edited by
        #11

        @Johnnyk91 said in QMake doesn't work properly:

        and it is installed.
        I've also found the directory with the Qt Headers QApplication, QObject, etc...

        Make sure the development packages are installed, that is qtbase5-dev and qtbase5-dev-tools.

        Read and abide by the Qt Code of Conduct

        J 2 Replies Last reply 12 Oct 2020, 19:05
        0
        • K kshegunov
          12 Oct 2020, 18:43

          @Johnnyk91 said in QMake doesn't work properly:

          and it is installed.
          I've also found the directory with the Qt Headers QApplication, QObject, etc...

          Make sure the development packages are installed, that is qtbase5-dev and qtbase5-dev-tools.

          J Offline
          J Offline
          Johnnyk91
          wrote on 12 Oct 2020, 19:05 last edited by
          #12

          @kshegunov Thank you for your suggestion. I turned off my computer. I'll check tomorrow and come back to you.

          1 Reply Last reply
          0
          • K kshegunov
            12 Oct 2020, 18:43

            @Johnnyk91 said in QMake doesn't work properly:

            and it is installed.
            I've also found the directory with the Qt Headers QApplication, QObject, etc...

            Make sure the development packages are installed, that is qtbase5-dev and qtbase5-dev-tools.

            J Offline
            J Offline
            Johnnyk91
            wrote on 13 Oct 2020, 02:15 last edited by
            #13

            @kshegunov I've just checked and they were already installed.

            All the packages related to qt on my computer are

            ii  libqt5concurrent5:amd64                    5.12.8+dfsg-0ubuntu1                amd64        Qt 5 concurrent module
            ii  libqt5core5a:amd64                         5.12.8+dfsg-0ubuntu1                amd64        Qt 5 core module
            ii  libqt5dbus5:amd64                          5.12.8+dfsg-0ubuntu1                amd64        Qt 5 D-Bus module
            ii  libqt5gui5:amd64                           5.12.8+dfsg-0ubuntu1                amd64        Qt 5 GUI module
            ii  libqt5network5:amd64                       5.12.8+dfsg-0ubuntu1                amd64        Qt 5 network module
            ii  libqt5opengl5:amd64                        5.12.8+dfsg-0ubuntu1                amd64        Qt 5 OpenGL module
            ii  libqt5opengl5-dev:amd64                    5.12.8+dfsg-0ubuntu1                amd64        Qt 5 OpenGL library development files
            ii  libqt5printsupport5:amd64                  5.12.8+dfsg-0ubuntu1                amd64        Qt 5 print support module
            ii  libqt5sql5:amd64                           5.12.8+dfsg-0ubuntu1                amd64        Qt 5 SQL module
            ii  libqt5sql5-sqlite:amd64                    5.12.8+dfsg-0ubuntu1                amd64        Qt 5 SQLite 3 database driver
            ii  libqt5svg5:amd64                           5.12.8-0ubuntu1                     amd64        Qt 5 SVG module
            ii  libqt5test5:amd64                          5.12.8+dfsg-0ubuntu1                amd64        Qt 5 test module
            ii  libqt5widgets5:amd64                       5.12.8+dfsg-0ubuntu1                amd64        Qt 5 widgets module
            ii  libqt5xml5:amd64                           5.12.8+dfsg-0ubuntu1                amd64        Qt 5 XML module
            ii  libqwt-qt5-6                               6.1.4-1.1build1                     amd64        Qt widgets library for technical applications (runtime, qt5)
            ii  qt5-default:amd64                          5.12.8+dfsg-0ubuntu1                amd64        Qt 5 development defaults package
            ii  qt5-gtk-platformtheme:amd64                5.12.8+dfsg-0ubuntu1                amd64        Qt 5 GTK+ 3 platform theme
            ii  qt5-qmake:amd64                            5.12.8+dfsg-0ubuntu1                amd64        Qt 5 qmake Makefile generator tool
            ii  qt5-qmake-bin                              5.12.8+dfsg-0ubuntu1                amd64        Qt 5 qmake Makefile generator tool — binary file
            ii  qtbase5-dev:amd64                          5.12.8+dfsg-0ubuntu1                amd64        Qt 5 base development files
            ii  qtbase5-dev-tools                          5.12.8+dfsg-0ubuntu1                amd64        Qt 5 base development programs
            ii  qtchooser                                  66-2build1                          amd64        Wrapper to select between Qt development binary versions
            ii  qttranslations5-l10n                       5.12.8-0ubuntu1                     all          translations for Qt 5
            
            
            J 1 Reply Last reply 13 Oct 2020, 02:23
            0
            • J Johnnyk91
              13 Oct 2020, 02:15

              @kshegunov I've just checked and they were already installed.

              All the packages related to qt on my computer are

              ii  libqt5concurrent5:amd64                    5.12.8+dfsg-0ubuntu1                amd64        Qt 5 concurrent module
              ii  libqt5core5a:amd64                         5.12.8+dfsg-0ubuntu1                amd64        Qt 5 core module
              ii  libqt5dbus5:amd64                          5.12.8+dfsg-0ubuntu1                amd64        Qt 5 D-Bus module
              ii  libqt5gui5:amd64                           5.12.8+dfsg-0ubuntu1                amd64        Qt 5 GUI module
              ii  libqt5network5:amd64                       5.12.8+dfsg-0ubuntu1                amd64        Qt 5 network module
              ii  libqt5opengl5:amd64                        5.12.8+dfsg-0ubuntu1                amd64        Qt 5 OpenGL module
              ii  libqt5opengl5-dev:amd64                    5.12.8+dfsg-0ubuntu1                amd64        Qt 5 OpenGL library development files
              ii  libqt5printsupport5:amd64                  5.12.8+dfsg-0ubuntu1                amd64        Qt 5 print support module
              ii  libqt5sql5:amd64                           5.12.8+dfsg-0ubuntu1                amd64        Qt 5 SQL module
              ii  libqt5sql5-sqlite:amd64                    5.12.8+dfsg-0ubuntu1                amd64        Qt 5 SQLite 3 database driver
              ii  libqt5svg5:amd64                           5.12.8-0ubuntu1                     amd64        Qt 5 SVG module
              ii  libqt5test5:amd64                          5.12.8+dfsg-0ubuntu1                amd64        Qt 5 test module
              ii  libqt5widgets5:amd64                       5.12.8+dfsg-0ubuntu1                amd64        Qt 5 widgets module
              ii  libqt5xml5:amd64                           5.12.8+dfsg-0ubuntu1                amd64        Qt 5 XML module
              ii  libqwt-qt5-6                               6.1.4-1.1build1                     amd64        Qt widgets library for technical applications (runtime, qt5)
              ii  qt5-default:amd64                          5.12.8+dfsg-0ubuntu1                amd64        Qt 5 development defaults package
              ii  qt5-gtk-platformtheme:amd64                5.12.8+dfsg-0ubuntu1                amd64        Qt 5 GTK+ 3 platform theme
              ii  qt5-qmake:amd64                            5.12.8+dfsg-0ubuntu1                amd64        Qt 5 qmake Makefile generator tool
              ii  qt5-qmake-bin                              5.12.8+dfsg-0ubuntu1                amd64        Qt 5 qmake Makefile generator tool — binary file
              ii  qtbase5-dev:amd64                          5.12.8+dfsg-0ubuntu1                amd64        Qt 5 base development files
              ii  qtbase5-dev-tools                          5.12.8+dfsg-0ubuntu1                amd64        Qt 5 base development programs
              ii  qtchooser                                  66-2build1                          amd64        Wrapper to select between Qt development binary versions
              ii  qttranslations5-l10n                       5.12.8-0ubuntu1                     all          translations for Qt 5
              
              
              J Offline
              J Offline
              JKSH
              Moderators
              wrote on 13 Oct 2020, 02:23 last edited by
              #14

              @Johnnyk91 said in QMake doesn't work properly:

              All the packages related to qt on my computer are

              You have installed the runtime packages.

              As @kshegunov said, you must also install the development packages.

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              J 1 Reply Last reply 13 Oct 2020, 02:46
              1
              • J JKSH
                13 Oct 2020, 02:23

                @Johnnyk91 said in QMake doesn't work properly:

                All the packages related to qt on my computer are

                You have installed the runtime packages.

                As @kshegunov said, you must also install the development packages.

                J Offline
                J Offline
                Johnnyk91
                wrote on 13 Oct 2020, 02:46 last edited by
                #15

                @JKSH Are the development packages qtbase5-dev and qtbase5-dev-tools ?

                J 1 Reply Last reply 13 Oct 2020, 03:57
                0
                • J Johnnyk91
                  13 Oct 2020, 02:46

                  @JKSH Are the development packages qtbase5-dev and qtbase5-dev-tools ?

                  J Offline
                  J Offline
                  JKSH
                  Moderators
                  wrote on 13 Oct 2020, 03:57 last edited by JKSH
                  #16

                  @Johnnyk91 said in QMake doesn't work properly:

                  @JKSH Are the development packages qtbase5-dev and qtbase5-dev-tools ?

                  Ah, sorry... I just noticed that you do have qtbase5-dev and qtbase5-dev-tools installed. OK, you already have the development packages.

                  Next thing to try: Install Qt Creator and see if you can use it to build an application.

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  1 Reply Last reply
                  1
                  • J Offline
                    J Offline
                    Johnnyk91
                    wrote on 13 Oct 2020, 10:43 last edited by
                    #17

                    I've managed to fix it.

                    I set the variable CONFIG to debug in my project file and I think that's why the modules weren't added.
                    I took this line off and I was able to compile and run my program.

                    Thank you for trying to help me

                    1 Reply Last reply
                    3
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 13 Oct 2020, 18:49 last edited by
                      #18

                      If you did something like

                      CONFIG = debug
                      

                      You, in fact, nuked the content of the variable and replaced it with debug.

                      If you want to modify the content of such a variable, use either += or *=. The first to add a value and the second to add the value only if not already in the variable.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      5

                      18/18

                      13 Oct 2020, 18:49

                      • Login

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