Compartilhar via


RTFx Powertoy Linker Error, and a solution

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

Comments

  • Anonymous
    July 22, 2006
    What happened to other blogs in this site. A lot of them have closed for "comment". I have a question regarding file system. If you could find someone give us a clue, I definitely will appreciate it

    The question is: Is the following a Microsoft bug on Windows CE?

    You can successfully call CreateFile with
    CreateFile(L"eicar.txt",.....)
    CreateFile(L"Windowseicar.txt"....
    AND
    CreateFile(L"Tempeicar.txt"....

    The filename does not follow FAT specification and MSDN documentations, but it works fine.



  • Anonymous
    July 22, 2006
    Sorry....Actually I mean
    ...
    CreateFile(L"Windows\eicar.txt")
    ..
    CreateFile(L"temp\eicar.txt")
  • Anonymous
    July 22, 2006
    oop again :)

    CreateFile(L"Windows\eicar.txt"...)
    CreateFile(L"temp\eicar.txt"...)

    Appology for spam...
  • Anonymous
    July 24, 2006
    hi, experts.
    I have a question about SetEvent().
    Will SetEvent() triger the system scheduler regardless whether there is a system_tick event or not?
    I mean will SetEvent() wake up WaitforSingleObject immediately? Or it just makes that event singled and goes on until it runs out its time-slice and then the scheduler wake up WaitforSingleObject?
  • Anonymous
    July 25, 2006
    Hi Simon, yes, SetEvent can lead to an immediate reschedule without waiting for a system tick.

    Sue