Hi cendryon,
Thanks for pointing that out. I followed the link and tried to understand what was given there. But i was unable to execute the "setenv LIBS -ldb" line as the setenv binary was not installed on my machine.
So instead of that I did the following
LIBS="-ldb -lgcc_s"
export LIBS
and along with this I also tried using a older BDB version that I had downloaded earlier. This time it was - db-5.1.19
and the final modifications that I had done to my variables were as follows;
--------------------------------------
PATH="$PATH:/Program-Files/db-5.1.19/lib/"
echo $PATH
CPPFLAGS="-I/Program-Files/db-5.1.19/include/"
export CPPFLAGS
LDFLAGS="-L/usr/local/lib -L/Program-Files/db-5.1.19/lib/ -R/Program-Files/db-5.1.19/lib/"
export LDFLAGS
LD_LIBRARY_PATH="/Program-Files/db-5.1.19/lib/"
export LD_LIBRARY_PATH
CFLAGS="-I/Program-Files/db-5.1.19/include/ -I/usr/local/include -I/usr/include"
export CFLAGS
LIBS="-ldb -lgcc_s"
export LIBS
------------------------------------
FYI .. i have installed my BDB and OpenLDAP packages in /Program-Files/ directory.
And once this was done it got executed like a charm.
So once again, Thanks to cendryon and travisdh1 for your time.
Thanks fr the Help ....