There is no reasonable way to make this happen.
The Compact Framework compiler supports C# and VB.NET. Managed C++ was never supported, though in some experimentation it could be made to generate an assembly. The problem is that the CF doesn't support all of the opcodes that .NET in general uses, so even if you manage to get it to build for a CF target, there's no way to guarantee it won't put in unsupported opcodes (the CF compilers do this filtering for you).
The other problem you have is that native code (whatever is loading your DLL) cannot host the CLR in the compact framework - the plumbing for EE Hosting simply doesn't exist outside of a managed application process. So even if you somehow got your DLL to compile, export the entry point and not have any invalid opcodes, the native process would have no way to spin up the EE to load the managed bits in the assembly.