Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    What does this error mean?

    Installation and Deployment
    5
    11
    4754
    Loading More Posts
    • 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.
    • B
      bootchk last edited by

      Please be more specific.

      I skimmed your post and do not see an error, only warnings (there is a difference.) I don't think most readers want to read 40 lines. Instead, please tell us exactly what error message you are concerned about.

      1 Reply Last reply Reply Quote 0
      • A
        amccarthy last edited by

        You are using the QString::arg() function which does not modify the original string but returns a new modified string. You are not using the return value, hence your code is essentially a no-op.

        1 Reply Last reply Reply Quote 0
        • I
          IamInu last edited by

          Hello, Thanks for replying. My previous message was the output I got when trying to compile an example of Qt. I got a very long warning/error message and the program did not work.

          I tried a simpler code:
          @
          #include <QApplication>
          #include <QPushButton>

          int main(int argc, char *argv[])
          {
          QApplication app(argc, argv);

          QPushButton bouton("Hello World!");
          bouton.show();
          
          return app.exec&#40;&#41;;
          

          }
          @

          It does not work and the error message is:
          @
          ../test/main.cpp:1:24: error: QApplication: No such file or directory
          ../test/main.cpp:2:23: error: QPushButton: No such file or directory
          ../test/main.cpp: In function 'int main(int, char**)':
          ../test/main.cpp:6: error: 'QApplication' was not declared in this scope
          ../test/main.cpp:6: error: expected ;' before 'app' ../test/main.cpp:8: error: 'QPushButton' was not declared in this scope ../test/main.cpp:8: error: expected ;' before 'bouton'
          ../test/main.cpp:9: error: 'bouton' was not declared in this scope
          ../test/main.cpp:11: error: 'app' was not declared in this scope
          ../test/main.cpp: At global scope:
          ../test/main.cpp:4: warning: unused parameter 'argc'
          ../test/main.cpp:4: warning: unused parameter 'argv'
          make: *** [main.o] Error 1
          @
          Any hints? Thanks a lot :)

          [Edit: Added @ tags for formatting -- mlong]

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Hi,

            since you'r using Qt5 add QT += qtwidgets to you pro file

            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 Reply Quote 0
            • G
              guziemic last edited by

              Hi,

              Looks like all Qt objects are missing (compiler does not see includes files). Can you post .pro file?

              BR,

              1 Reply Last reply Reply Quote 0
              • I
                IamInu last edited by

                Hello, this is all what was written automatically in the .pro file:

                SOURCES +=
                main.cpp

                1 Reply Last reply Reply Quote 0
                • I
                  IamInu last edited by

                  @SGaist: I added QT += qtwidgets and here is the error message:

                  Project ERROR: Unknown module(s) in QT: qtwidgets
                  make: *** [Makefile] Error 3
                  make: Leaving directory `/Users/ines/test-build-Desktop_Qt_5_0_1_clang_64bit-Debug'
                  10:13:10: The process "/usr/bin/make" exited with code 2.
                  Error while building/deploying project test (kit: Desktop Qt 5.0.1 clang 64bit)
                  When executing step 'Make'

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    Your pro file does not contain the minimal stuff to build a Qt project. Since your trying things, delete that project and create a new Qt Gui Application with QtCreator. This will give you a starting point to test code

                    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 Reply Quote 0
                    • I
                      IamInu last edited by

                      I created a Qt Gui Application but again I have this huge list of warnings as output and then this

                      10:45:48: The process "/usr/bin/make" exited with code 2.
                      Error while building/deploying project test (kit: Desktop Qt 5.0.1 clang 64bit)
                      When executing step 'Make'

                      1 Reply Last reply Reply Quote 0
                      • I
                        IamInu last edited by

                        A question, When I compile an example of Qt creator, it should normally work? I tried out different example and each time I have this huge list of warning and errors ...

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post