We have decided to use the pkg-config software for linking and compiling with our libraries. Let us suppose that we provide the foo library, and that you have installed the foo-devel package (with yum for example).
Have a look in /usr/lib/pkgconfig (sometimes it is /usr/lib64/pkgconfig), to check if some .pc file exists, as it should. Let us suppose that you find a foo-2.0.pc file. It means the your package is named foo-2.0 when you involve pkg-config tools.
Now you know the name, this is a typical compiling line...
... and this is the linking command.
you can have multiple names if you use more than one library :
This means, of course, that foo-2.0.pc, bar.pc and gtk+-2.0.pc have to be actually present in /usr/lib/pkgconfig.