|Oracle includes its own LDAP-functions in the library libclntsh. These functions conflict with the OpenLDAP-functions, since Oracle's functions have the same names, but a different syntax.
When compiling a program that needs access to both Oracle and OpenLDAP, make sure that the OpenLDAP-libraries are linked before the Oracle libraries, by making sure that "-lldap -llber" occurs before "-lclntsh" in your gcc commandline.
If you use Pro*C, you will notice that Pro*C bombs on several of OpenLDAP's calls, since the syntax of Oracle's functions are different from OpenLDAP's. Pro*C expects the Oracle calls, and thus some calls to OpenLDAP will result in a syntax error. The easiest way to fix this is to place all your calls to OpenLDAP-functions in a separate header-file. Pro*C only preprocesses the main program, and not the header files.|
This has been tested and verified with Oracle 8i, Pro*C 18.104.22.168.0 and gcc egcs-2.91.66 19990314 on a Linux machine.