Search code examples
c++linuxcompiler-errorsg++ns-3

Error: /usr/bin/ld: final link failed: File truncated


I am getting the following error in NS3 compiling(through waf):-

/usr/bin/ld: final link failed: File truncated

collect2: ld returned 1 exit status

What could be the possible reason for the same?


Solution

  • One of the object files you're linking was not completed and is now either an empty file or truncated because the compilation terminated for some reason. Delete the file in question (the error message should contain the name) and rebuild.