VSCode Error: collect2.exe: error: ld returned 1 exit status

error can not generate the compiled file, probably because the same name it.
delete the previously generated .exe, and then in the current .cpp file page, press the key combination Ctrl+Shift+B to regenerate it, no error reported.

Read More: