1. http://www.airspayce.com/mikem/bcm2835/ read related information about C library for Broadcom BCM 2835 as used in Raspberry Pi.
2. wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.XX.tar.gz --------- download the package.
3. tar zxvf bcm2835-1.XX.tar.gz ------- unzip then enter the directory.
4. ./configure
5. make
6. sudo make check
7. sudo make install ---------- The library is now ready to use