Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I do not how to fix tehe error "unresolved external symbol _ldap...

Status
Not open for further replies.

elio25

Programmer
Aug 27, 2001
1
VE
I am making an application with ldap functions in visual c++, when the compiler try to translate de .obj to a .exe program, appear 9 error like these:

***.obj:error LNK2001: unresolved external symbol _ladap_modfify_s@12

where ldap_modify_s is a function that I am using into my program.

I do not how to fix this error. I only know it is because for calling externals libraries and DLLs.
 
Hi,
the ***.obj tells you which file ***.cpp the unresolved symbol is being generated in.

it could be that you forgot to include the correct header file to define the calling convention for this symbol.

The compiler would give you a warning like

ladap_modfify_s used without prototype assuming returns int.

Since this is a microsoft function you can got to the

HELP -> INDEX

( assuming you installed the HELP files when you installed the visual C++ )

type in

ldap_modify_s


and get the description of the call and as part of the description it will tell you which library to include.


Requirements
Windows NT/2000: Requires Windows NT 4.0 SP4 or later.
Windows 95/98: Requires Windows 95/98 (with IE 4.01 or later and DSClient). Not supported on Windows Me.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.
Unicode: Implemented as Unicode and ANSI versions on all platforms.



Header: Declared in Winldap.h.

this says make sure to include

#include <Windap.h>

In the file using this call.


Library: Use Wldap32.lib.

Then go to the Project -> settings -> Link

and add

Wldap32.lib

to the list of libraries you need to link with. This isn't one of the default libraries.

Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top