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



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



  • You have to provide much more information.



  • 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



  • 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).



  • thank u very much =)



  • 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 tofirst_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 tovtable 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 tovtable for first_sys'
    collect2: ld returned 1 exit status
    make: *** [ns] Error 1



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



  • 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?



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.