I am a network engineer trying to do...
Articles and Tips: qna
01 May 2001
Q.
I am a network engineer trying to do some LDAP-type programming. I downloaded the Novell SDK and simply typed in a simple search program straight out of the Novell's LDAP Developer Guide. The program compiles without errors but I get several link errors:
search.obj : error LNK2001: unresolved external symbol
search.obj : error LNK2001: unresolved external symbol _ldap_value_free@4
search.obj : error LNK2001: unresolved external symbol _ldap_get_values@12
search.obj : error LNK2001: unresolved external symbol
_ldap_next_attribute@12
search.obj : error LNK2001: unresolved external symbol
_ldap_first_attribute@12
search.obj : error LNK2001: unresolved external symbol _ldap_memfree@4
search.obj : error LNK2001: unresolved external symbol _ldap_get_dn@8
search.obj : error LNK2001: unresolved external symbol _ldap_next_entry@8
search.obj : error LNK2001: unresolved external symbol _ldap_first_entry@8
search.obj : error LNK2001: unresolved external symbol
_ldap_search_ext_s@44
search.obj : error LNK2001: unresolved external symbol _ldap_unbind_s@4
search.obj : error LNK2001: unresolved external symbol _ldap_err2string@4
search.obj : error LNK2001: unresolved external symbol
_ldap_simple_bind_s@12
search.obj : error LNK2001: unresolved external symbol _ldap_init@8
search.obj : error LNK2001: unresolved external symbol _ldap_set_option@12
Debug/search.exe : fatal error LNK1120: 15 unresolved externals
Error executing link.exe.
Can you tell me what would be causing this? I've configured the "inc" and "lib\win32\mscvc" as additional include and lib directories within VC++.
A.
A. This looks like the LDAP lib file is not being included. In your VC project, open the project settings and make sure that "ldapsdk.lib" is included in the "Object/library modules" list.
* Originally published in Novell AppNotes
Disclaimer
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.