You probably need to include the SFML directory.
Something like this:
g++ -c main.cpp -I~SFML_INCLUDE_DIRECTORY_GOES_HERE~
//like in
g++ -c main.cpp -I/home/me/SFML/include
I'd personally use an IDE.
@edit
Yeah I did, and I running "make install" seemed to do it. Now I'm getting yet another error. I can now compile my code, but can't run it.
./main ./main: error while loading shared libraries: libsfml-window.so.2: cannot open shared object file: No such file or directory
If g++ is building your program successfully, but you can't find it, look if the main executable wasn't generated in a different directory. Using -o to specify a name, as in g++ main.cpp -o program.exe can help you locate it.
But this may be a linkage problem; linking statically will probably solve this.