Error: ld returned 1 exit status

  • error: cannot open output file debug\XYZ.exe: Permission denied.

    What exactly does this mean?
    The program works fine if the new project is created with the same program in it.

  • Moderators

    @Nisha_R Check if XYZ.exe is running already.

  • Sometimes a GUI programs vanishes from the display got is still running background. Close all Application Output tabs from Qt Creator and run the project again. Then try cleaning and rebuilding. The last resort (maybe it should sometimes be the first resort) is to manually delete the build directory and rebuild from scratch, that always works for me. Deleting it also reveals all hidden running instances because you can't delete a file which is in use.

  • Qt Champions 2017

    You must be hitting this issue on windows. Windows os will not allow to rewrite the exe file if process is already running using same executable. Go to task manager and kill the process with the executable name. After this u be alright.

  • @dheerendra Thank you, got it resolved.

Log in to reply