You probably just need to install the correct package. RH9 doesn't install most development packages by default. Use their cute little software package tool that appears when you insert CD#1 to find the Development section for Databases or Applications (I don't know the exact label they use). Click on Details, the check the boxes for anything having to do with postgres.
The package that libpq++ is in is either postresql or postgresql-libs. I discovered this by googling "libpq++ RPM".