first what version of CentOS ?
The current is CentOS 6.3
Also to build programs you need ( ether the source code) or the headers
the headers are in the *-devel.rpm packages
for most normal everyday programs you MUST have the basic development packages installed
"yum" make this easy
outputs a very long list of "groups" of packages
the normal basic needed are
--- and a good thing to have ,but not a MUST HAVE ? most of the time---
-- and if any source code is using the GTK Gnome desktop
"Desktop Platform Development"
--- and for centos 5 -- changed in 6
And can be installed using yum
yum groupinstall "Development Tools" "Compatibility Libraries" "Desktop Platform Development"
that should install all the needed headers for almost all "normal everyday program"
also a very good thing to have installed ( if not already ) is
"Graphical Administrative Tools"
yum groupinstall "Graphical Administrative Tools"