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. Error "Target xxx.obj does not exist" in pri
QtWS25 Last Chance

Error "Target xxx.obj does not exist" in pri

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 2 Posters 621 Views
  • 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.
  • Andy314A Offline
    Andy314A Offline
    Andy314
    wrote on last edited by Andy314
    #1

    Hello,

    Often I compile the current file, I am working on, with Menu: Build/Build xxx.cpp to check it. (Resp. I have a hotkey for it.)

    This works no more for new files I added to a subproject (*.pri). The active parse context in the editor is shown correct. For new files in main project all works.

    The common "tricks" to clean, delete makefiles, run qmake do not work.
    This is strange, because when I build the whole project all works. The xxx.cpp will be compiled.
    For older files "build current file" works without problems.

    What is the difference of the new files to the old files ?

    jsulmJ 1 Reply Last reply
    0
    • Andy314A Andy314

      Hello,

      Often I compile the current file, I am working on, with Menu: Build/Build xxx.cpp to check it. (Resp. I have a hotkey for it.)

      This works no more for new files I added to a subproject (*.pri). The active parse context in the editor is shown correct. For new files in main project all works.

      The common "tricks" to clean, delete makefiles, run qmake do not work.
      This is strange, because when I build the whole project all works. The xxx.cpp will be compiled.
      For older files "build current file" works without problems.

      What is the difference of the new files to the old files ?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Andy314 Were the new files added in exactly same way as old ones?

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

      Andy314A 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Andy314 Were the new files added in exactly same way as old ones?

        Andy314A Offline
        Andy314A Offline
        Andy314
        wrote on last edited by Andy314
        #3

        @jsulm said in Error "Target xxx.obj does not exist" in pri:

        @Andy314 Were the new files added in exactly same way as old ones?

        I cannot really remember how I did it some month ago, but usually I
        use Add New->C++ Class.
        Nevertheless the only effect should be additional file entries in the pri-file.
        That all looks OK.

        O I forgot: When I added the old files I used an older Qt/Creator version.

        jsulmJ 1 Reply Last reply
        0
        • Andy314A Andy314

          @jsulm said in Error "Target xxx.obj does not exist" in pri:

          @Andy314 Were the new files added in exactly same way as old ones?

          I cannot really remember how I did it some month ago, but usually I
          use Add New->C++ Class.
          Nevertheless the only effect should be additional file entries in the pri-file.
          That all looks OK.

          O I forgot: When I added the old files I used an older Qt/Creator version.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Andy314 You can check the pro/pri files to see how the files were added

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

          Andy314A 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Andy314 You can check the pro/pri files to see how the files were added

            Andy314A Offline
            Andy314A Offline
            Andy314
            wrote on last edited by
            #5

            @jsulm said in Error "Target xxx.obj does not exist" in pri:

            @Andy314 You can check the pro/pri files to see how the files were added

            They all look total identical to the other files.

            INCLUDEPATH += $$PWD
            HEADERS +=
            $$PWD/ActionLogging_Form.h \ // works not
            $$PWD/qtdatabase.h \ // works
            ..................

            jsulmJ 1 Reply Last reply
            0
            • Andy314A Andy314

              @jsulm said in Error "Target xxx.obj does not exist" in pri:

              @Andy314 You can check the pro/pri files to see how the files were added

              They all look total identical to the other files.

              INCLUDEPATH += $$PWD
              HEADERS +=
              $$PWD/ActionLogging_Form.h \ // works not
              $$PWD/qtdatabase.h \ // works
              ..................

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Andy314 said in Error "Target xxx.obj does not exist" in pri:

              $$PWD/ActionLogging_Form.h \ // works not

              This is a header file. Is it included anywhere?

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

              Andy314A 1 Reply Last reply
              0
              • jsulmJ jsulm

                @Andy314 said in Error "Target xxx.obj does not exist" in pri:

                $$PWD/ActionLogging_Form.h \ // works not

                This is a header file. Is it included anywhere?

                Andy314A Offline
                Andy314A Offline
                Andy314
                wrote on last edited by Andy314
                #7

                @jsulm said in Error "Target xxx.obj does not exist" in pri:

                @Andy314 said in Error "Target xxx.obj does not exist" in pri:

                $$PWD/ActionLogging_Form.h \ // works not

                This is a header file. Is it included anywhere?

                I have shown only the Headers. I have similar entries for the SOURCES and FORMS.
                I have included the header in ActionLogging_Form.cpp and an other cpp.

                Andy314A 1 Reply Last reply
                0
                • Andy314A Andy314

                  @jsulm said in Error "Target xxx.obj does not exist" in pri:

                  @Andy314 said in Error "Target xxx.obj does not exist" in pri:

                  $$PWD/ActionLogging_Form.h \ // works not

                  This is a header file. Is it included anywhere?

                  I have shown only the Headers. I have similar entries for the SOURCES and FORMS.
                  I have included the header in ActionLogging_Form.cpp and an other cpp.

                  Andy314A Offline
                  Andy314A Offline
                  Andy314
                  wrote on last edited by Andy314
                  #8

                  @Andy314

                  I tested a lot over hours to find out whats the problem.
                  Creation of a new projekt or folder projekts gave the same error. Files with old filenames worked, new filenames worked no.
                  The after some changing of "set xxx als active projekt" the Creator tried to compile (or was it reversed) a Cpp file with Python. This gave the hint that with the Creator is something wrong, the active project (resp. the file project relation) was no accepted correctly.
                  Creating of a new workspace and integration my old project solved the problem. There must be a bug in the Creator.

                  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