> even i tried gcc -o main.c add.c
Nice, you just trashed your source file with a mis-guided -o option.

> When I ran the command gcc main.c add.c I received an error message
Right, and I'm supposed to believe you managed to read my post and create the 4 necessary files?