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 compiling
Qt 6.11 is out! See what's new in the release blog

Error compiling

Scheduled Pinned Locked Moved General and Desktop
9 Posts 2 Posters 6.8k 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.
  • G Offline
    G Offline
    glowdemon1
    wrote on last edited by
    #1

    Hi, whenever I try to run my project I get the following error :
    @collect2.exe:-1: error: fatal error: cannot find 'ld'@

    Here's my compile output :
    @15:12:53: Running steps for project mtacreat...
    15:12:53: Configuration unchanged, skipping qmake step.
    15:12:53: Starting: "C:\Qt\Tools\mingw48_32\bin\mingw32-make.exe"
    C:/Qt/Tools/mingw48_32/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory 'C:/Users/Robbe/Documents/build-mtacreat-Desktop_Qt_5_2_1_MinGW_32bit-Debug'
    g++ -Wl,-subsystem,windows -mthreads -o debug\mtacreat.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -lqtmaind -LC:\Qt\5.2.1\mingw48_32\lib -lQt5Widgetsd -lQt5Guid -lQt5Cored
    collect2.exe: fatal error: cannot find 'ld'
    compilation terminated.
    Makefile.Debug:80: recipe for target 'debug\mtacreat.exe' failed
    mingw32-make[1]: *** [debug\mtacreat.exe] Error 1
    mingw32-make[1]: Leaving directory 'C:/Users/Robbe/Documents/build-mtacreat-Desktop_Qt_5_2_1_MinGW_32bit-Debug'
    makefile:34: recipe for target 'debug' failed
    mingw32-make: *** [debug] Error 2
    15:12:56: The process "C:\Qt\Tools\mingw48_32\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project mtacreat (kit: Desktop Qt 5.2.1 MinGW 32bit)
    When executing step 'Make'
    15:12:56: Elapsed time: 00:03.@

    I run Windows7 and use the qt IDE, I haven't written any code yet, I have only designed my guis. If I forgot to post something please let me know. Also, if it may help I constantly get errors about how qt cannot write on my disk because it lacks space, but I guarantee you it does not.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      clochydd
      wrote on last edited by
      #2

      Hi, the message collect2.exe: fatal error: cannot find 'ld' says that the linker (eg. mingw) cannot be found. You should check whether all components are installed.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        glowdemon1
        wrote on last edited by
        #3

        [quote author="Clochydd" date="1397222635"]Hi, the message collect2.exe: fatal error: cannot find 'ld' says that the linker (eg. mingw) cannot be found. You should check whether all components are installed.[/quote]

        How do I do that? It used to work before, it even did 30 minutes ago.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          clochydd
          wrote on last edited by
          #4

          If it worked before:
          Can you remember what has been modified?
          Changed directory names?
          Installed or deinstalled something?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            glowdemon1
            wrote on last edited by
            #5

            [quote author="Clochydd" date="1397226447"]If it worked before:
            Can you remember what has been modified?
            Changed directory names?
            Installed or deinstalled something?[/quote]

            Tbh, I don't remember. But what I've noticed is that my workspace directory seemed to have changed to my documents folder.

            Edit: I'm currently re-installing QT to another directory.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              glowdemon1
              wrote on last edited by
              #6

              So, I re-installed QT to another directory, it still throws me those "memory full" errors but at least the error is solved and I can now continue programming.

              Edit : Aaaaaand it's back, I added a label, a text edit and a pushbutton and tried to run my project. Got the same error, removed the stuff I had created, still the same error.

              Edit Edit : http://puu.sh/84Gkd.png I keep on getting these messages too, I've already cleared out my appdata qtproject folder.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                clochydd
                wrote on last edited by
                #7

                Could you post your error error message again?
                I cannot understand why the linker error disappeared and is back now so we should analyse in depth.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  glowdemon1
                  wrote on last edited by
                  #8

                  Okay, so I did a clean install of qt and cleared out my appdata, also I reset my path variables. I've just started up QT and ran a test project and it seemed to work fine now. Also my full memory errors are gone.

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    clochydd
                    wrote on last edited by
                    #9

                    That's good news - happy coding!

                    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