Hi
I am a newbie to VC++ and this is my first independent project so please pardon my ignorance!!
My project compiles and runs perfectly fine in Debug mode.
However, when I try to compile it in Release mode ( I need this to use the Setup wizard for application Deployment) I get the following error:
I am using the following parameters:
Calling Convention : _stdcall (/Gz)
Common Language Runtime Support (/clr)
I have also added the library file ole32.lib in the Additional Dependancies in the Project Property.
When I try to use :
I get the following Link errors:
Soorali
I am a newbie to VC++ and this is my first independent project so please pardon my ignorance!!
My project compiles and runs perfectly fine in Debug mode.
However, when I try to compile it in Release mode ( I need this to use the Setup wizard for application Deployment) I get the following error:
error C4439: 'main' : function definition with a managed type in the signature must have a __clrcall calling convention
I am using the following parameters:
Calling Convention : _stdcall (/Gz)
Common Language Runtime Support (/clr)
I have also added the library file ole32.lib in the Additional Dependancies in the Project Property.
When I try to use :
Code:
[I]int __clrcall main(array<System::String ^> ^args)[/I]
error LNK2001: unresolved external symbol "extern "C" void __stdcall HidD_GetHidGuid (struct _GUID *)" (?HidD_GetHidGu id@@$$J14YGXPAU _GUID@@@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" void * __stdcall SetupDiGetClass DevsA(struct _GUID const *,char const *,struct HWND__ *,unsigned long)" (?SetupDiGetCla ssDevsA@@$$J216 YGPAXPBU_GUID@@ PBDPAUHWND__@@K @Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" int __stdcall SetupDiEnumDevi ceInterfaces(vo id *,struct _SP_DEVINFO_DAT A *,struct _GUID const *,unsigned long,struct _SP_DEVICE_INTE RFACE_DATA *)" (?SetupDiEnumDe viceInterfaces@ @$$J220YGHPAXPA U_SP_DEVINFO_DA TA@@PBU_GUID@@K PAU_SP_DEVICE_I NTERFACE_DATA@@ @Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" int __stdcall SetupDiGetDevic eInterfaceDetai lA(void *,struct _SP_DEVICE_INTE RFACE_DATA *,struct _SP_DEVICE_INTE RFACE_DETAIL_DA TA_A *,unsigned long,unsigned long *,struct _SP_DEVINFO_DAT A *)" (?SetupDiGetDev iceInterfaceDet ailA@@$$J224YGH PAXPAU_SP_DEVIC E_INTERFACE_DAT A@@PAU_SP_DEVIC E_INTERFACE_DET AIL_DATA_A@@KPA KPAU_SP_DEVINFO _DATA@@@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" unsigned char __stdcall HidD_GetAttribu tes(void *,struct _HIDD_ATTRIBUTE S *)" (?HidD_GetAttri butes@@$$J18YGE PAXPAU_HIDD_ATT RIBUTES@@@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" int __stdcall SetupDiDestroyD eviceInfoList(v oid *)" (?SetupDiDestro yDeviceInfoList @@$$J14YGHPAX@Z )
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" unsigned char __stdcall HidD_SetOutputR eport(void *,void *,unsigned long)" (?HidD_SetOutpu tReport@@$$J212 YGEPAX0K@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" unsigned char __stdcall HidD_GetInputRe port(void *,void *,unsigned long)" (?HidD_GetInput Report@@$$J212Y GEPAX0K@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" long __stdcall UuidCreate(stru ct _GUID *)" (?UuidCreate@@$ $J14YGJPAU_GUID @@@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" long __stdcall UuidToStringA(s truct _GUID const *,unsigned char * *)" (?UuidToStringA @@$$J18YGJPBU_G UID@@PAPAE@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" long __stdcall RpcStringFreeA( unsigned char * *)" (?RpcStringFree A@@$$J14YGJPAPA E@Z)
1>C:\Documents and Settings\bandu\ My Documents\Visua l Studio 2008\Projects\1 3th July - TES GUI wshid\GUI\Relea se\GUI.exe : fatal error LNK1120: 11 unresolved externals
Please Help!!1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" void * __stdcall SetupDiGetClass DevsA(struct _GUID const *,char const *,struct HWND__ *,unsigned long)" (?SetupDiGetCla ssDevsA@@$$J216 YGPAXPBU_GUID@@ PBDPAUHWND__@@K @Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" int __stdcall SetupDiEnumDevi ceInterfaces(vo id *,struct _SP_DEVINFO_DAT A *,struct _GUID const *,unsigned long,struct _SP_DEVICE_INTE RFACE_DATA *)" (?SetupDiEnumDe viceInterfaces@ @$$J220YGHPAXPA U_SP_DEVINFO_DA TA@@PBU_GUID@@K PAU_SP_DEVICE_I NTERFACE_DATA@@ @Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" int __stdcall SetupDiGetDevic eInterfaceDetai lA(void *,struct _SP_DEVICE_INTE RFACE_DATA *,struct _SP_DEVICE_INTE RFACE_DETAIL_DA TA_A *,unsigned long,unsigned long *,struct _SP_DEVINFO_DAT A *)" (?SetupDiGetDev iceInterfaceDet ailA@@$$J224YGH PAXPAU_SP_DEVIC E_INTERFACE_DAT A@@PAU_SP_DEVIC E_INTERFACE_DET AIL_DATA_A@@KPA KPAU_SP_DEVINFO _DATA@@@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" unsigned char __stdcall HidD_GetAttribu tes(void *,struct _HIDD_ATTRIBUTE S *)" (?HidD_GetAttri butes@@$$J18YGE PAXPAU_HIDD_ATT RIBUTES@@@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" int __stdcall SetupDiDestroyD eviceInfoList(v oid *)" (?SetupDiDestro yDeviceInfoList @@$$J14YGHPAX@Z )
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" unsigned char __stdcall HidD_SetOutputR eport(void *,void *,unsigned long)" (?HidD_SetOutpu tReport@@$$J212 YGEPAX0K@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" unsigned char __stdcall HidD_GetInputRe port(void *,void *,unsigned long)" (?HidD_GetInput Report@@$$J212Y GEPAX0K@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" long __stdcall UuidCreate(stru ct _GUID *)" (?UuidCreate@@$ $J14YGJPAU_GUID @@@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" long __stdcall UuidToStringA(s truct _GUID const *,unsigned char * *)" (?UuidToStringA @@$$J18YGJPBU_G UID@@PAPAE@Z)
1>GUI.obj : error LNK2001: unresolved external symbol "extern "C" long __stdcall RpcStringFreeA( unsigned char * *)" (?RpcStringFree A@@$$J14YGJPAPA E@Z)
1>C:\Documents and Settings\bandu\ My Documents\Visua l Studio 2008\Projects\1 3th July - TES GUI wshid\GUI\Relea se\GUI.exe : fatal error LNK1120: 11 unresolved externals
Soorali
Comment