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. Run app issue: ld returned 5 exit status

Run app issue: ld returned 5 exit status

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 1.7k 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.
  • K Offline
    K Offline
    Kaluss
    wrote on last edited by
    #1

    Hi all,
    I got following problem:
    collect2.exe: error: ld returned 5 exit status
    mingw32-make[1]: *** [Makefile.Debug:611: debug/AppName.exe] Error 1
    mingw32-make[1]: Leaving directory 'C:/work/repos/build-AppName-Desktop_Qt_6_4_3_MinGW_64_bit-Debug'
    mingw32-make: *** [Makefile:45: debug] Error 2
    Proces "C:\Qt\Tools\mingw1120_64\bin\mingw32-make.exe" stopped working with exit code: 2.
    Build error / install project Appname (Tool set: Desktop Qt 6.4.3 MinGW 64-bit)
    During step "Make"

    How could I investigate that?

    JonBJ 1 Reply Last reply
    0
    • K Kaluss

      Hi all,
      I got following problem:
      collect2.exe: error: ld returned 5 exit status
      mingw32-make[1]: *** [Makefile.Debug:611: debug/AppName.exe] Error 1
      mingw32-make[1]: Leaving directory 'C:/work/repos/build-AppName-Desktop_Qt_6_4_3_MinGW_64_bit-Debug'
      mingw32-make: *** [Makefile:45: debug] Error 2
      Proces "C:\Qt\Tools\mingw1120_64\bin\mingw32-make.exe" stopped working with exit code: 2.
      Build error / install project Appname (Tool set: Desktop Qt 6.4.3 MinGW 64-bit)
      During step "Make"

      How could I investigate that?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Kaluss said in Run app issue: ld returned 5 exit status:

      ld returned 5 exit status

      How could I investigate that?

      By Googling ld returned 5 exit status, which I see has many hits depending on your environment including for MinGW.

      K 1 Reply Last reply
      0
      • JonBJ JonB

        @Kaluss said in Run app issue: ld returned 5 exit status:

        ld returned 5 exit status

        How could I investigate that?

        By Googling ld returned 5 exit status, which I see has many hits depending on your environment including for MinGW.

        K Offline
        K Offline
        Kaluss
        wrote on last edited by
        #3

        @JonB Found this one, but it doesn't help:
        https://stackoverflow.com/questions/45077846/collect2-exe-error-ld-returned-5-exit-status

        JonBJ 1 Reply Last reply
        0
        • K Kaluss

          @JonB Found this one, but it doesn't help:
          https://stackoverflow.com/questions/45077846/collect2-exe-error-ld-returned-5-exit-status

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @Kaluss
          So for example

          mingw {
                  contains(QT_ARCH, x86_64): {
                      LIBS+=-Wl,--no-gc-sections
                  }
          }
          

          (i.e. -Wl,--no-gc-sections) did not work for you?

          Or -Wl,--verbose did not provide better information?

          K 1 Reply Last reply
          0
          • JonBJ JonB

            @Kaluss
            So for example

            mingw {
                    contains(QT_ARCH, x86_64): {
                        LIBS+=-Wl,--no-gc-sections
                    }
            }
            

            (i.e. -Wl,--no-gc-sections) did not work for you?

            Or -Wl,--verbose did not provide better information?

            K Offline
            K Offline
            Kaluss
            wrote on last edited by Kaluss
            #5

            @JonB nothing really handy. Downgrade myself to 5.15 and everything works smoothly there. In 6.4.3 unfortunately mingw 32bit is not supported. I will stick to 5.15 then. Thank you very much for support. You are great !

            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