LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-12-2005, 01:52 PM   #1
WuKitty
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Rep: Reputation: 0
RedHat3.0: problem when compiling C++ code using the 'ldap' structure


Hi all,


I am trying to compile some C++ code using LDAP on Linux, and I get
a quite "surprising" error:
the 'ldap' structure is not defined in the system headers !
(see .../include/ldap.h (line 501): "typedef struct ldap LDAP;")


Here is the related code:
----------------------------------------------------------------------------
#include <lber.h>
#include <ldap.h>

...
LDAP* l_ldap;
char* l_msg = ldap_err2string(l_ldap->ld_errno ); (line 217)
...
----------------------------------------------------------------------------

and its results:
----------------------------------------------------------------------------
LDAPFactory.cpp: In member function `virtual Ldap::LDAPReturn LDAPFactory::add(char*, char*)':
LDAPFactory.cpp:217: error: invalid use of undefined type `struct ldap'
/usr/include/ldap.h:501: error: forward declaration of `struct ldap'
----------------------------------------------------------------------------


Did anybody experience a similar problem with the RedHat3.0 distribution?
Is there any additional header needed?


Thanks for your help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Apache with ldap support ultrix Linux - Software 1 06-02-2008 10:33 PM
Problem Compiling C code on FC4 BBPS Programming 4 09-30-2005 11:23 AM
How can I find out the reason of unexpected reboot (redhat3+2.6.11)? yuzuohong Linux - General 2 05-24-2005 05:49 PM
Problem compiling code in g++ works for gcc juan_de_margo Programming 3 02-24-2005 03:41 AM
Problem in compiling source code JIV Linux - Software 1 02-14-2004 03:11 AM


All times are GMT -5. The time now is 01:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration