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. After using 'Duplicate file' menu, the new file does not compile
Forum Updated to NodeBB v4.3 + New Features

After using 'Duplicate file' menu, the new file does not compile

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 221 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.
  • I Offline
    I Offline
    In Fo
    wrote on last edited by In Fo
    #1

    I duplicated a CPP file and its H, renamed the class, and consumed this new class in the program.
    Now that I build, I get linker errors for the constructor of this class being unresolved.
    I checked the PRO file and the new class is included at the end of SOURCES and HEADERS, but there is no compiled OBJ in the build directory (Debug in this case).
    Any ideas why the new file does not compile and the build progresses all the way to linking?

    If I right click on any of the files in the project and select Build, they compile and the output shows. On this file, there is an error:

    20:54:35: Starting: "C:\Qt\Qt5.11.3\Tools\QtCreator\bin\jom.exe" -f Makefile.Debug debug/OpenCLTester.obj
    Error: Target debug/OpenCLTester.obj doesn't exist.
    

    Does this mean that every time a file is duplicated, Qmake has to be run?

    jsulmJ 1 Reply Last reply
    0
    • I In Fo

      I duplicated a CPP file and its H, renamed the class, and consumed this new class in the program.
      Now that I build, I get linker errors for the constructor of this class being unresolved.
      I checked the PRO file and the new class is included at the end of SOURCES and HEADERS, but there is no compiled OBJ in the build directory (Debug in this case).
      Any ideas why the new file does not compile and the build progresses all the way to linking?

      If I right click on any of the files in the project and select Build, they compile and the output shows. On this file, there is an error:

      20:54:35: Starting: "C:\Qt\Qt5.11.3\Tools\QtCreator\bin\jom.exe" -f Makefile.Debug debug/OpenCLTester.obj
      Error: Target debug/OpenCLTester.obj doesn't exist.
      

      Does this mean that every time a file is duplicated, Qmake has to be run?

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

      @In-Fo said in After using 'Duplicate file' menu, the new file does not compile:

      Does this mean that every time a file is duplicated, Qmake has to be run?

      Yes, because else makefiles will not be regenerated.

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

      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