VC++ 7 Link Error : unresolved external symbol 
Author Message
 VC++ 7 Link Error : unresolved external symbol

I have been working on this problem for two days but I am
still dead in the water. I have added all the lib and
include files to the project resource and lib options but
it still gives me:

"error LNK2019: unresolved external symbol

and

"error LNK2001: unresolved external symbol _IID_IADs"

here is the code snippet that is causing the problem could
anyone please give some helpful pointers. I would greatly
appreciate it.

thanks!

#include <activeds.h>
...

HRESULT hr;
IADs *pObj;
USES_CONVERSION
LPCWSTR adsPath A2CW("CN=myobject,DC=mydomain,DC=com");

...

hr = ADsGetObject(adsPath,IID_IADs,(void**)&pObj);  

...



Tue, 15 Jun 2004 04:41:41 GMT  
 VC++ 7 Link Error : unresolved external symbol
Harout,
You need to Add Item->Existing Item->ActiveDs.lib to your project. Otherwise
there is nothing for the .h file to get from the dll... ultimately the
linker needs the .lib file for all the information about the functions and
members which you are accessing from the dll.

--
regards,
Robert Svilpa
Software Design Engineer in Test
Managed Extensions for C++
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved.


Quote:
> I have been working on this problem for two days but I am
> still dead in the water. I have added all the lib and
> include files to the project resource and lib options but
> it still gives me:

> "error LNK2019: unresolved external symbol

> and

> "error LNK2001: unresolved external symbol _IID_IADs"

> here is the code snippet that is causing the problem could
> anyone please give some helpful pointers. I would greatly
> appreciate it.

> thanks!

> #include <activeds.h>
> ...

> HRESULT hr;
> IADs *pObj;
> USES_CONVERSION
> LPCWSTR adsPath A2CW("CN=myobject,DC=mydomain,DC=com");

> ...

> hr = ADsGetObject(adsPath,IID_IADs,(void**)&pObj);

> ...



Tue, 15 Jun 2004 06:11:30 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Linking error 2019 unresolved external symbol _main when porting to .NET

2. Linking error 2019 unresolved external symbol _main ...

3. Linking Problem when trying to create ReleaseUMinDependency[error LNK2001: unresolved external symbol _main]

4. Linking Errors - unresolved external symbol _SQLConnect@28

5. link error LNK2001 - unresolved external symbol

6. Link error.(unresolved external symbol _main)

7. linking error Unresolved external symbol in eVC4

8. NtCreateFile() unresolved external link error in VC++ 4.2

9. PxSQLScript.obj : error LNK2001: unresolved external symbol "class ATL::CTraceCa

10. Error LNK20001 unresolved external symbol main.

11. error LNK2001: unresolved external symbol _ntohl@4

12. error LINK2001: unresolved external symbol _capCreateCaptureWindowA@32

 

 
Powered by phpBB® Forum Software