Collect2.exe: error: ld returned 9 exit status

Hi, I am facing the same problem. Could you mention all the folders and registries you had to uninstall?
Here are the things I did:
1.Running Revo uninstaller:
a. Ran default uninstaller.
b. Ran advanced Revo function.
i. Deleted registries.
ii. Deleted unwanted folders.
2.Manually removing files:
a. Deleted everything in Program Files
b. Deleted everything in Program FIles (X86)
c. Deleted '.arduinoide' in Users folder.
d. Deleted 'Arduino Ide' and 'Arduino Ide Updater' in Users/Appdata/Local
e. Deleted Local/Temp
f. Deleted all files in Appdata/Roaming
g. Deleted 'Arduino' in Documents