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. how to solve these error when building from command line
Forum Updated to NodeBB v4.3 + New Features

how to solve these error when building from command line

Scheduled Pinned Locked Moved Solved General and Desktop
16 Posts 6 Posters 1.9k Views 2 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.
  • R Offline
    R Offline
    rajel052
    wrote on 9 Aug 2022, 12:43 last edited by rajel052 8 Sept 2022, 12:45
    #1

    when i am running make command from terminal it gives error

    make[3]: *** [Makefile:540: obj/qmuparserbase.o] Error 1
    make[3]: Leaving directory '/home/rajel052/seamly2d/src/libs/qmuparser'
    make[2]: *** [Makefile:60: sub-qmuparser-make_first] Error 2
    make[2]: Leaving directory '/home/rajel052/seamly2d/src/libs'
    make[1]: *** [Makefile:49: sub-libs-make_first] Error 2
    make[1]: Leaving directory '/home/rajel052/seamly2d/src'
    make: *** [Makefile:47: sub-src-make_first] Error 2

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 9 Aug 2022, 18:09 last edited by
      #2

      Hi,

      The actual error is not in the lines you posted. It will be above.

      Also, which version of Qt are you using in Qt Creator ?
      Which one are you using on the command line ?

      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
      1
      • R Offline
        R Offline
        rajel052
        wrote on 10 Aug 2022, 05:43 last edited by rajel052 8 Oct 2022, 05:43
        #3

        Hii , @SGaist i am using Qt version 5.12.8

        $ make
        cd src/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/rajel052/seamly2d/src/src.pro ) && make -f Makefile
        make[1]: Entering directory '/home/rajel052/seamly2d/src'
        cd libs/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/rajel052/seamly2d/src/libs/libs.pro ) && make -f Makefile
        make[2]: Entering directory '/home/rajel052/seamly2d/src/libs'
        cd qmuparser/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/rajel052/seamly2d/src/libs/qmuparser/qmuparser.pro ) && make -f Makefile
        make[3]: Entering directory '/home/rajel052/seamly2d/src/libs/qmuparser'
        compiling qmuparserbase.cpp
        cc1plus: warning: /usr/include/x86_64-linux-gnu/qt5/QtXmlPatterns: No such file or directory [-Wmissing-include-dirs]
        cc1plus: warning: /usr/include/x86_64-linux-gnu/qt5/QtSvg: No such file or directory [-Wmissing-include-dirs]
        qmuparserbase.cpp: In member function ‘void qmu::QmuParserBase::StackDump(const QStack<qmu::QmuParserToken<double, QString> >&, const QStack<qmu::QmuParserToken<double, QString> >&) const’:
        qmuparserbase.cpp:1891:21: error: ‘dec’ is not a member of ‘Qt’
        1891 | qDebug() << Qt::dec;
        | ^~~
        qmuparserbase.cpp:1891:21: note: suggested alternatives:
        In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTextStream:1,
        from qmuparserbase.cpp:28:
        /usr/include/x86_64-linux-gnu/qt5/QtCore/qtextstream.h:238:28: note: ‘dec’
        238 | Q_CORE_EXPORT QTextStream &dec(QTextStream &s);
        | ^~~
        In file included from /usr/include/c++/9/ios:42,
        from /usr/include/c++/9/ostream:38,
        from /usr/include/c++/9/iterator:64,
        from /usr/include/x86_64-linux-gnu/qt5/QtCore/qbytearray.h:53,
        from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:49,
        from /usr/include/x86_64-linux-gnu/qt5/QtCore/qhashfunctions.h:44,
        from /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:47,
        from /usr/include/x86_64-linux-gnu/qt5/QtCore/qmap.h:44,
        from /usr/include/x86_64-linux-gnu/qt5/QtCore/QMap:1,
        from qmuparserbase.h:28,
        from qmuparserbase.cpp:22:
        /usr/include/c++/9/bits/ios_base.h:1028:3: note: ‘std::dec’
        1028 | dec(ios_base& __base)
        | ^~~
        make[3]: *** [Makefile:540: obj/qmuparserbase.o] Error 1
        make[3]: Leaving directory '/home/rajel052/seamly2d/src/libs/qmuparser'
        make[2]: *** [Makefile:60: sub-qmuparser-make_first] Error 2
        make[2]: Leaving directory '/home/rajel052/seamly2d/src/libs'
        make[1]: *** [Makefile:49: sub-libs-make_first] Error 2
        make[1]: Leaving directory '/home/rajel052/seamly2d/src'
        make: *** [Makefile:47: sub-src-make_first] Error 2

        C 1 Reply Last reply 13 Aug 2022, 08:37
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 10 Aug 2022, 06:54 last edited by
          #4

          From the looks of it, you are using your distribution provided Qt on the command line and you did not install all the development packages required.

          When on the command line, use the full path to the qmake executable that you want to use to build your application.

          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
          1
          • R Offline
            R Offline
            rajel052
            wrote on 12 Aug 2022, 09:24 last edited by rajel052 8 Dec 2022, 09:24
            #5

            Hii, @SGaist how to fix these error

            how to install development package

            please help me

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 12 Aug 2022, 19:08 last edited by
              #6

              Check your distribution package manager.

              Or since you have installed Qt using the online installer: use the full path to the qmake executable that your can find in the bin folder of the Qt version you installed with the online installer.

              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
              1
              • R rajel052
                10 Aug 2022, 05:43

                Hii , @SGaist i am using Qt version 5.12.8

                $ make
                cd src/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/rajel052/seamly2d/src/src.pro ) && make -f Makefile
                make[1]: Entering directory '/home/rajel052/seamly2d/src'
                cd libs/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/rajel052/seamly2d/src/libs/libs.pro ) && make -f Makefile
                make[2]: Entering directory '/home/rajel052/seamly2d/src/libs'
                cd qmuparser/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile /home/rajel052/seamly2d/src/libs/qmuparser/qmuparser.pro ) && make -f Makefile
                make[3]: Entering directory '/home/rajel052/seamly2d/src/libs/qmuparser'
                compiling qmuparserbase.cpp
                cc1plus: warning: /usr/include/x86_64-linux-gnu/qt5/QtXmlPatterns: No such file or directory [-Wmissing-include-dirs]
                cc1plus: warning: /usr/include/x86_64-linux-gnu/qt5/QtSvg: No such file or directory [-Wmissing-include-dirs]
                qmuparserbase.cpp: In member function ‘void qmu::QmuParserBase::StackDump(const QStack<qmu::QmuParserToken<double, QString> >&, const QStack<qmu::QmuParserToken<double, QString> >&) const’:
                qmuparserbase.cpp:1891:21: error: ‘dec’ is not a member of ‘Qt’
                1891 | qDebug() << Qt::dec;
                | ^~~
                qmuparserbase.cpp:1891:21: note: suggested alternatives:
                In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTextStream:1,
                from qmuparserbase.cpp:28:
                /usr/include/x86_64-linux-gnu/qt5/QtCore/qtextstream.h:238:28: note: ‘dec’
                238 | Q_CORE_EXPORT QTextStream &dec(QTextStream &s);
                | ^~~
                In file included from /usr/include/c++/9/ios:42,
                from /usr/include/c++/9/ostream:38,
                from /usr/include/c++/9/iterator:64,
                from /usr/include/x86_64-linux-gnu/qt5/QtCore/qbytearray.h:53,
                from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:49,
                from /usr/include/x86_64-linux-gnu/qt5/QtCore/qhashfunctions.h:44,
                from /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:47,
                from /usr/include/x86_64-linux-gnu/qt5/QtCore/qmap.h:44,
                from /usr/include/x86_64-linux-gnu/qt5/QtCore/QMap:1,
                from qmuparserbase.h:28,
                from qmuparserbase.cpp:22:
                /usr/include/c++/9/bits/ios_base.h:1028:3: note: ‘std::dec’
                1028 | dec(ios_base& __base)
                | ^~~
                make[3]: *** [Makefile:540: obj/qmuparserbase.o] Error 1
                make[3]: Leaving directory '/home/rajel052/seamly2d/src/libs/qmuparser'
                make[2]: *** [Makefile:60: sub-qmuparser-make_first] Error 2
                make[2]: Leaving directory '/home/rajel052/seamly2d/src/libs'
                make[1]: *** [Makefile:49: sub-libs-make_first] Error 2
                make[1]: Leaving directory '/home/rajel052/seamly2d/src'
                make: *** [Makefile:47: sub-src-make_first] Error 2

                C Offline
                C Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on 13 Aug 2022, 08:37 last edited by Christian Ehrlicher
                #7

                @rajel052 said in how to solve these error when building from command line:

                1891 | qDebug() << Qt::dec;

                Also this is wrong - Qt has no function dec, but std has: std::dec

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

                mrjjM 1 Reply Last reply 13 Aug 2022, 08:53
                0
                • C Christian Ehrlicher
                  13 Aug 2022, 08:37

                  @rajel052 said in how to solve these error when building from command line:

                  1891 | qDebug() << Qt::dec;

                  Also this is wrong - Qt has no function dec, but std has: std::dec

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 13 Aug 2022, 08:53 last edited by
                  #8

                  @Christian-Ehrlicher
                  Actually
                  alt text

                  and
                  qDebug() << Qt::dec;

                  compiles and runs. o.O
                  (Qt 5.15)

                  C 1 Reply Last reply 13 Aug 2022, 08:57
                  0
                  • mrjjM mrjj
                    13 Aug 2022, 08:53

                    @Christian-Ehrlicher
                    Actually
                    alt text

                    and
                    qDebug() << Qt::dec;

                    compiles and runs. o.O
                    (Qt 5.15)

                    C Offline
                    C Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on 13 Aug 2022, 08:57 last edited by
                    #9

                    @mrjj said in how to solve these error when building from command line:

                    qDebug() << Qt::dec;

                    Then the include for QTextStream is missing. :)

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

                    mrjjM 1 Reply Last reply 13 Aug 2022, 09:33
                    1
                    • C Christian Ehrlicher
                      13 Aug 2022, 08:57

                      @mrjj said in how to solve these error when building from command line:

                      qDebug() << Qt::dec;

                      Then the include for QTextStream is missing. :)

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on 13 Aug 2022, 09:33 last edited by
                      #10

                      @Christian-Ehrlicher
                      Just saw it suggest it under
                      qmuparserbase.cpp:1891:21: note: suggested alternatives:
                      /usr/include/x86_64-linux-gnu/qt5/QtCore/qtextstream.h:238:28: note: ‘dec’
                      238 | Q_CORE_EXPORT QTextStream &dec(QTextStream &s);

                      So yeah it could be that simple :)

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        rajel052
                        wrote on 24 Aug 2022, 04:47 last edited by rajel052
                        #11

                        Hi , Not Solved yet
                        how to build on 5.12.8 distribution provided
                        how to install required development packages
                        how to use full path to the qmake executable.

                        C 1 Reply Last reply 24 Aug 2022, 05:53
                        0
                        • R rajel052
                          24 Aug 2022, 04:47

                          Hi , Not Solved yet
                          how to build on 5.12.8 distribution provided
                          how to install required development packages
                          how to use full path to the qmake executable.

                          C Offline
                          C Offline
                          ChrisW67
                          wrote on 24 Aug 2022, 05:53 last edited by
                          #12

                          how to build on 5.12.8 distribution provided

                          You have not told us who provided the distribution

                          how to install required development packages

                          That depends on the distribution.
                          For Ubuntu 20.04 you can see the development packages here.

                          how to use full path to the qmake executable.

                          $ locate qmake
                              # Select one of the paths to a qmake executable that is shown on your system
                              # Use that
                              # Examples:
                          $ /usr/bin/qmake
                          $ /home/rajel052/Qt/.../bin/qmake
                          
                          R 1 Reply Last reply 24 Aug 2022, 07:19
                          1
                          • R Offline
                            R Offline
                            rajel052
                            wrote on 24 Aug 2022, 06:48 last edited by rajel052
                            #13
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • C ChrisW67
                              24 Aug 2022, 05:53

                              how to build on 5.12.8 distribution provided

                              You have not told us who provided the distribution

                              how to install required development packages

                              That depends on the distribution.
                              For Ubuntu 20.04 you can see the development packages here.

                              how to use full path to the qmake executable.

                              $ locate qmake
                                  # Select one of the paths to a qmake executable that is shown on your system
                                  # Use that
                                  # Examples:
                              $ /usr/bin/qmake
                              $ /home/rajel052/Qt/.../bin/qmake
                              
                              R Offline
                              R Offline
                              rajel052
                              wrote on 24 Aug 2022, 07:19 last edited by
                              #14

                              @ChrisW67
                              $ qmake /home/rajel052/Qt/5.15.2/gcc_64/bin/qmake
                              $ make
                              g++ -Wl,-O1 -o qmake /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Core.so /usr/lib/x86_64-linux-gnu/libGL.so -lpthread
                              /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x24): undefined reference to main'
                              collect2: error: ld returned 1 exit status
                              make: *** [Makefile:147: qmake] Error 1

                              jsulmJ 1 Reply Last reply 25 Aug 2022, 05:49
                              0
                              • R rajel052
                                24 Aug 2022, 07:19

                                @ChrisW67
                                $ qmake /home/rajel052/Qt/5.15.2/gcc_64/bin/qmake
                                $ make
                                g++ -Wl,-O1 -o qmake /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Core.so /usr/lib/x86_64-linux-gnu/libGL.so -lpthread
                                /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x24): undefined reference to main'
                                collect2: error: ld returned 1 exit status
                                make: *** [Makefile:147: qmake] Error 1

                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on 25 Aug 2022, 05:49 last edited by jsulm
                                #15

                                @rajel052 said in how to solve these error when building from command line:

                                qmake /home/rajel052/Qt/5.15.2/gcc_64/bin/qmake

                                What is this?! You are supposed to call qmake using absolute path instead of just qmake:

                                /home/rajel052/Qt/5.15.2/gcc_64/bin/qmake PATH_TO_YOUR_PRO_FILE
                                

                                Also, delete the content of your build folder before calling qmake.

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                2
                                • R Offline
                                  R Offline
                                  rajel052
                                  wrote on 25 Aug 2022, 11:35 last edited by
                                  #16

                                  thank you @ChrisW67

                                  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