You need to add the library path to /etc/ld.so.conf.d/ and then run ldconfig with sudo.
That way, the system will find the library and so does the linker for your program.
thanks... i tried this, but still not working.
verified it with ldconfig -v
/usr/lib/oracle/11.2/client/lib:
libocci.so.11.1 -> libocci.so.11.1
libociei.so -> libociei.so
libsqlplusic.so -> libsqlplusic.so
libocijdbc11.so -> libocijdbc11.so
libclntsh.so.11.1 -> libclntsh.so.11.1
libnnz11.so -> libnnz11.so
libsqlplus.so -> libsqlplus.so