If your library is not in one of the default places searched by the g++ link command, then you need to tell it where it is.

./configure by default normally results in "make install" putting libraries in /usr/local/lib. I haven't checked whether this is the case here, but assuming that it is, then you need
$ g++ aa.cpp -lgraph -L/usr/local/lib
Then when you come to run your executable, you will need to set LD_LIBRARY_PATH (see "man ld.so") or add you library via ldconfig (see "man ldconfig").