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. Permission denied and Collect2.exe error
Forum Update on Monday, May 27th 2025

Permission denied and Collect2.exe error

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 4 Posters 4.0k 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.
  • F Offline
    F Offline
    Freiluk
    wrote on last edited by Freiluk
    #1

    Hi All,

    I'm trying to compile and run a programm and I constantly receive these two error messages.
    error: cannot open output file debug\ProjektMockUp.exe: Permission denied
    error: collect2.exe: error: ld returned 1 exit status

    I really don't know what to do. It started once, crashed, I closed it. I cannot see anything running in the Task Manager, I deactivated my Anti Virus.
    Any Idea?
    Thanks a lot in advance!

    This is what the Compile Output tab provides:

    C:/Qt/Qt5.12.8/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file debug\ProjektMockUp.exe: Permission denied
    collect2.exe: error: ld returned 1 exit status
    mingw32-make[1]: *** [Makefile.Debug:69: debug/ProjektMockUp.exe] Error 1
    mingw32-make[1]: Leaving directory 'C:/Users/Lukas/Desktop/QT/Arrays/build-ProjektMockUp-Desktop_Qt_5_12_8_MinGW_64_bit-Debug'
    mingw32-make: *** [Makefile:38: debug] Error 2
    15:42:08: The process "C:\Qt\Qt5.12.8\Tools\mingw730_64\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project ProjektMockUp (kit: Desktop Qt 5.12.8 MinGW 64-bit)
    When executing step "Make"

    jsulmJ 1 Reply Last reply
    0
    • F Freiluk

      Hi All,

      I'm trying to compile and run a programm and I constantly receive these two error messages.
      error: cannot open output file debug\ProjektMockUp.exe: Permission denied
      error: collect2.exe: error: ld returned 1 exit status

      I really don't know what to do. It started once, crashed, I closed it. I cannot see anything running in the Task Manager, I deactivated my Anti Virus.
      Any Idea?
      Thanks a lot in advance!

      This is what the Compile Output tab provides:

      C:/Qt/Qt5.12.8/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file debug\ProjektMockUp.exe: Permission denied
      collect2.exe: error: ld returned 1 exit status
      mingw32-make[1]: *** [Makefile.Debug:69: debug/ProjektMockUp.exe] Error 1
      mingw32-make[1]: Leaving directory 'C:/Users/Lukas/Desktop/QT/Arrays/build-ProjektMockUp-Desktop_Qt_5_12_8_MinGW_64_bit-Debug'
      mingw32-make: *** [Makefile:38: debug] Error 2
      15:42:08: The process "C:\Qt\Qt5.12.8\Tools\mingw730_64\bin\mingw32-make.exe" exited with code 2.
      Error while building/deploying project ProjektMockUp (kit: Desktop Qt 5.12.8 MinGW 64-bit)
      When executing step "Make"

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

      @Freiluk Delete the executable file and build again

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

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Freiluk
        wrote on last edited by
        #3

        Hi,
        thanks for the quick reply :)
        doesn't work unfortunately.
        Windows says it is still running/opened somewhere.. I scrolled through the Task Manager 4 times now and cannot find it :(

        jsulmJ 1 Reply Last reply
        0
        • F Freiluk

          Hi,
          thanks for the quick reply :)
          doesn't work unfortunately.
          Windows says it is still running/opened somewhere.. I scrolled through the Task Manager 4 times now and cannot find it :(

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

          @Freiluk What works most of the time with Windows is a reboot :-)

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

          1 Reply Last reply
          1
          • kkoehneK Offline
            kkoehneK Offline
            kkoehne
            Moderators
            wrote on last edited by
            #5

            Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer ) allows you to search all processes by handle or DLL substring. But yes, restarting Windows usually helps, too ;)

            Director R&D, The Qt Company

            1 Reply Last reply
            3
            • F Offline
              F Offline
              Freiluk
              wrote on last edited by Freiluk
              #6

              This is amazing thank you!
              I finally found it!

              Reboot didn't work, and I finally figured, that I should not run it in Debug mode rather in Release.

              Thanks a lot for your quick help!

              Edit: Process Lasso eventually solved it best for me. It consitently showed the falsely running processes and .exe.

              M 1 Reply Last reply
              0
              • F Freiluk

                This is amazing thank you!
                I finally found it!

                Reboot didn't work, and I finally figured, that I should not run it in Debug mode rather in Release.

                Thanks a lot for your quick help!

                Edit: Process Lasso eventually solved it best for me. It consitently showed the falsely running processes and .exe.

                M Offline
                M Offline
                MightyGeeK
                wrote on last edited by
                #7

                @Freiluk Thanks man, changing from Debug to release also helped me

                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