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. What does "collect2: ld returned 1 exit status" mean?
Forum Updated to NodeBB v4.3 + New Features

What does "collect2: ld returned 1 exit status" mean?

Scheduled Pinned Locked Moved General and Desktop
10 Posts 7 Posters 65.4k Views 2 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.
  • A Offline
    A Offline
    ahmed kato
    wrote on last edited by
    #1

    what is :: error: collect2: ld returned 1 exit status???

    Ahmed Kato
    Computer & communications student
    Intern and MSP at Microsoft

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      You have to provide much more information.

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

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

        First of all, this is not a qt error, itÄs a linker error of the mingw / gcc tool chain.
        ld is the linker of mingw/gcc.
        I assume, that one or more dlls are not found or that some functions have no body...
        But for more information, you must provide more input

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          Assuming that you work with Qt Creator, the error message you stated is on the "build problems" tab. You should switch to the "compilation" tab (the 4th tab), where the full length linker and error output is collected. There you should find the class names wich are missing to the linker (which is most likely the cause of your problem).

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ahmed kato
            wrote on last edited by
            #5

            thank u very much =)

            Ahmed Kato
            Computer & communications student
            Intern and MSP at Microsoft

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tahere
              wrote on last edited by
              #6

              Hi whenever i inlcude a header to one of my .c files in NS2, for attach XFUZZY in NS, i get this error: collect2: ld returned 1 exit status.
              any help would be much appreciated!

              result of make command:

              mac/802_11e/mac-802_11e.o: In function Mac802_11e::send(Packet*, Handler*)': mac-802_11e.cc:(.text+0x1e31): undefined reference to first_sys::inference(double, double, double, double, double*)'
              mac/802_11e/mac-802_11e.o: In function first_sys::first_sys()': mac-802_11e.cc:(.text._ZN9first_sysC1Ev[first_sys::first_sys()]+0x16): undefined reference to vtable for first_sys'
              mac/802_11e/mac-802_11e.o: In function first_sys::~first_sys()': mac-802_11e.cc:(.text._ZN9first_sysD1Ev[first_sys::~first_sys()]+0xb): undefined reference to vtable for first_sys'
              collect2: ld returned 1 exit status
              make: *** [ns] Error 1

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DerManu
                wrote on last edited by
                #7

                How does your .pro look? Do you tell qmake to link to the libs properly?

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tahere
                  wrote on last edited by
                  #8

                  I have not using from qmake, I want to attach xfuzzy code produced by xfuzzy software in NS2, network simulator; but when I search about my error, I find this page.
                  can u help me?

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    DerManu
                    wrote on last edited by
                    #9

                    It seems like you're missing a function definition for first_sys::inference. Further there seem to be missing objects/libraries that contain "first_sys".
                    I'd ask in respective fora of those libraries. This is a Qt forum so on this issue we can only give this general help about typical linking errors.

                    1 Reply Last reply
                    0
                    • I Offline
                      I Offline
                      iHad169
                      wrote on last edited by
                      #10
                      sudo apt install libgl-dev libglu-dev libglib2.0-dev libsm-dev libxrender-dev libfontconfig1-dev libxext-dev
                      

                      source link

                      1 Reply Last reply
                      1

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved