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
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 2 Posters 642 Views 1 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.
  • A Offline
    A Offline
    Andy314
    wrote on 3 Mar 2021, 09:55 last edited by Andy314 3 Mar 2021, 09:56
    #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 ?

    J 1 Reply Last reply 3 Mar 2021, 09:57
    0
    • A Andy314
      3 Mar 2021, 09:55

      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 ?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 3 Mar 2021, 09:57 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

      A 1 Reply Last reply 3 Mar 2021, 10:03
      0
      • J jsulm
        3 Mar 2021, 09:57

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

        A Offline
        A Offline
        Andy314
        wrote on 3 Mar 2021, 10:03 last edited by Andy314 3 Mar 2021, 10:06
        #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.

        J 1 Reply Last reply 3 Mar 2021, 10:14
        0
        • A Andy314
          3 Mar 2021, 10:03

          @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.

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 3 Mar 2021, 10:14 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

          A 1 Reply Last reply 3 Mar 2021, 10:22
          0
          • J jsulm
            3 Mar 2021, 10:14

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

            A Offline
            A Offline
            Andy314
            wrote on 3 Mar 2021, 10:22 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
            ..................

            J 1 Reply Last reply 3 Mar 2021, 10:24
            0
            • A Andy314
              3 Mar 2021, 10:22

              @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
              ..................

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 3 Mar 2021, 10:24 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

              A 1 Reply Last reply 3 Mar 2021, 10:32
              0
              • J jsulm
                3 Mar 2021, 10:24

                @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?

                A Offline
                A Offline
                Andy314
                wrote on 3 Mar 2021, 10:32 last edited by Andy314 3 Mar 2021, 10:33
                #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.

                A 1 Reply Last reply 6 Mar 2021, 17:46
                0
                • A Andy314
                  3 Mar 2021, 10:32

                  @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.

                  A Offline
                  A Offline
                  Andy314
                  wrote on 6 Mar 2021, 17:46 last edited by Andy314 3 Jun 2021, 17:50
                  #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

                  4/8

                  3 Mar 2021, 10:14

                  • Login

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