I did compile it from source using gcc v 4.3.3 on red hat distribution and the command as below:

$ ./configure --disable-gmp --prefix=<custom directory where i wanted the library>
$ make

$ make install

I got the libigraph.a libigraph.so usual symlink files (\i.e. libigraph.so.0 etc) along with the package config directory containing .pc file in the directory i mentioned in the prefix. ..... i used package config to get the -I<path> and -L<path> to compile the example and it got compiled properly.

but on running the error i mentioned is coming. i have tried cleaning and compiling many times to ensure that the build is OK.