Ok Ralf,
The functions "ldap_sasl_bind_s()", "ldap_sasl_bind_s()" had functioned now !
Thanks, edm.
On 6/19/07, Ralf Haferkamp rhafer@suse.de wrote:
On Tuesday 19 June 2007 14:57, Eder wrote:
Hello all,
I am having problems to compile the code below with C++, in the version oldest of the OpenLdap I did not have this problem.
=============code====================
[..]
============end====================
% c++ -I/usr/local/include -L/usr/local/lib -lldap test_ldap.cpp -o test_ldap test_ldap.cpp: In function `int main(int, char**)': test_ldap.cpp:31: error: `ldap_simple_bind_s' was not declared in this scope test_ldap.cpp:40: error: `ldap_unbind' was not declared in this scope
Those function have been deprecated sometime ago. You should be using non-deprecated functions which would be "ldap_unbind_ext()" and "ldap_sasl_bind_s()". For more details you should probably search the list archives as this topic has already come up several times. And you might wanna check this little howto: http://opensuse.org/OpenLDAP_2.3_libldap_upgrade_howto
devel:% uname -a FreeBSD devel.cb.sc.gov.br 6.2-STABLE FreeBSD 6.2-STABLE #0: Mon May 28 08:58:45 BRT 2007 root@devel.cb.sc.gov.br:/usr/src/sys/i386/compile/DEVEL i386
Used --> openldap-client-2.3.35 Open source LDAP client implementation
One another question, exists a API of the OpenLdap for C++?
Yes. It's part of OpenLDAP since 2.1 (or even 2.0). You'll find it in the contrib directory of the source tarball.
regards, Ralf
-- SUSE LINUX Products GmbH, Maxfeldstrasse 5, D-90409 Nuernberg T: +49-911-74053-0 F: +49-911-74053575 - Ralf.Haferkamp@suse.com