compilation – C compile : collect2: error: ld returned 1 exit status

compilation – C compile : collect2: error: ld returned 1 exit status

Your problem is the typo in the function CreateDectionary().You should change it to CreateDictionary().
collect2: error: ld returned 1 exit status is the same problem in both C and C++, usually it means that you have unresolved symbols. In your case is the typo that i mentioned before.

I got this problem, and tried many ways to solve it. Finally, it turned out that make clean and make again solved it. The reason is:
I got the source code together with object files compiled previously with an old gcc version. When my newer gcc version wants to link that old object files, it cant resolve some function in there. It happens to me several times that the source code distributors do not clean up before packing, so a make clean saved the day.

compilation – C compile : collect2: error: ld returned 1 exit status

sometimes this error came beacause failed to compile in middlest of any build.
The best way to try is by doing make clean and again make the whole code .

Leave a Reply

Your email address will not be published.