Posted by Dave Edson

If you get this error when building a plugin for the Microsoft Smart Devices Remote Tools Framework (RTFx):

Error     1          error LNK2019: unresolved external symbol "__declspec(dllimport) public: static long __cdecl CDeviceRemoteTool::StartCommandHandler(wchar_t *,enum CDeviceRemoteTool::COMMANDHANDLER_TYPE,long (__cdecl*)(unsigned long,class CCommandPacket const *,class CCommandPacket *))" (__imp_?StartCommandHandler@CDeviceRemoteTool@@SAJPA_WW4COMMANDHANDLER_TYPE@1@P6AJKPBVCCommandPacket@@PAV3@@Z@Z) referenced in function WinMain        DeviceSide.obj  


Then it means that a compiler switch needs to be changed. For the device-side native projects, open the properties for the device side project. Then, go to the C/C++ node, and choose "Language". Change the "Treat wchar_t as a built-in Type" to "No (/Zc:wchar_t-)".


Hope this helps,


Dave Edson

RTFx Wrangler