Qt Forum

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

    [Solved] Build problem in Qt Creator

    General and Desktop
    3
    10
    2598
    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.
    • H
      Hareen Laks last edited by

      Hi everyone,

      I'm using Qt Creator 2.4.1 Based on Qt 4.7.4 on windows 7.

      When I run or build the application it is not working the way it should.

      For example

      qDebug() << "This is first";

      shows the text 'This is first'. But even if I change it to

      qDebug() << "This is second";

      sometimes it still shows the text 'This is first'.

      This is not occurring every time.

      Is there any way to fix it?

      Thanks in advance.

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

        Hi,

        Do you mean in the console output of QtCreator ? Did you clear the console output ?

        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
        • H
          Hareen Laks last edited by

          Thanks for replying..

          Not only in the console output. Sometimes it not build the changes of source code.

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

            Are you sure the change have been saved ?

            Do you run the application using the CTRL+R or the green arrow on the Application Output Pane ?

            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
            • H
              Hareen Laks last edited by

              I set to autosave the changes when press large green arrow on sidebar. So I'm not manually save.

              I run the application by large green arrow not an small one.

              The problem is the results are not repeatable every time. Sometimes it build the changes and sometimes not. The problem occurs today. I'm working with qt since few months without this type of problem.

              Thank you very much for helping me..

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

                Is your code in a static library ?

                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
                • H
                  Hareen Laks last edited by

                  Sorry for the delay. I'm out of office.

                  Difficult question for me. I'm beginner. :)

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

                    In that case, can you describe your project (template used etc...) ?

                    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
                    • K
                      koahnig last edited by

                      @Hareen Laks

                      It looks to me that your application is not compiled every time you have changed the code. You have apparently a very simply application with presumably just some few files, so it has only a limited complexity. So it is a bit strange.

                      Whenever you change code you should save it (ctrl+s to save one file, ctrl+shift+s for all files changed) before compilation (ctrl+b or ctrl+shift+b). You can perform the same tasks through the menu. Sometimes it may be helpful to do a complete recompile or a "Run qmake". Especially switching between release and debug modes seems sometimes to confuse qt creator. The recompile and rerun of qmake recommendation are based on my personal experience with large projects on windows 7 with qt creator 2.6.0. Therefore, I find it a bit strange that similar problems are existing with smaller projects.

                      Furthermore, you might want to update your installation. From my viewpoint at least qt creator which is now in version 2.7. You may to continue to use the new creator version with Qt 4.7.4 if you do not want to change that one for any reason. However, when starting with Qt there are probable no restrictions (other than limited disk resources on old HW) to install the new Qt SDK with e.g. MinGW compiler, Qt creator and Qt 5. Having a consistent new setup might solve also some problems. BTW if you have enough disk space, you can leave Qt 4.7.4 on your machine and build with both tool chains.

                      Vote the answer(s) that helped you to solve your issue(s)

                      1 Reply Last reply Reply Quote 0
                      • H
                        Hareen Laks last edited by

                        @ SGaist, koahnig

                        I reinstall the Qt creator and still it is working fine.

                        But unfortunately, I haven't know idea because of what it is occurred.

                        Thank you very much for both of you..

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