المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : error LNK2019: unresolved external symbol "long __cdecl _com_dispatch_method



C++ Programming
05-25-2009, 01:50 PM
Hi I am using a ADO in my project. But when i compile my code i am getting the follwoing error.

error LNK2019: unresolved external symbol "long __cdecl _com_dispatch_method(struct IDispatch *,long,unsigned short,unsigned short,void *,wchar_t const *,...)" (?_com_dispatch_method@@YAJPAUIDispatch@@JGGPAXPB_WZZ) referenced in function "public: long __thiscall ConnectionEvents::InfoMessage(struct Error *,enum EventStatusEnum *,struct _Connection *)" (?InfoMessage@ConnectionEvents@@QAEJPAUError@@PAW4EventStatusEnum@@PAU_Connection@@@Z)

I have added this in my stdafx.cpp
#import "..\..\..\..\..\Microsoft\Redistribute\MSADO15.dll" no_namespace \
rename("Parameters","ADOParams") \
rename("Connection","ADOCon") \
rename("Parameter","ADOParam") \
rename("EOF", "adoEOF") \ implementation_only

and below code in my stdafx.h file

#import "..\..\..\..\..\Microsoft\Redistribute\MSADO15.dll" no_namespace \
rename("Parameters","ADOParams") \
rename("Connection","ADOCon") \
rename("Parameter","ADOParam") \
rename("EOF", "adoEOF") \ no_implementation


Please provide any comment i am not able to find out what is to be included to avoid this linking error.