Why is the error "collect2.exe: error: ld returned 1 exit status" showing when I run my c code

5743 views c vim

How to fix the error, please do not downvote this because it is too trivial I have just started to learn my first language. (the code)

answered question

It is always recommended to include code as text instead of linking images. If you will be downvoted this could be the reason. ;)

Coming to your question, your code should compile correctly. When that linking error occurs, it is probably because the executable is in use (probably you executed it and clicking on the shell made the execution "freeze").

1 Answer


The collect2.exe: ld returned 1 exit status error is a consequence of an error that came before it. Not sure if this'll help, but try re-naming int value() to int main().

posted this

Have an answer?


Please login first before posting an answer.