I am developing right now a Wrapper C++ Managed to be able to use a library C++ Unmanaged in a “.NET” application.
When I compiled it, some .NET internal errors were found. The unit/file with problem is “ServProv.h” and the erros are:
Error 1:
\Vc7\PlatformSDK\Include\ServProv.h(93) : error C2872: 'IServiceProvider' : ambiguous symbol
could be '\Vc7\PlatformSDK\Include\ServProv.h(48) : System::IServiceProvider IServiceProvider'
or 'Stdafx.cpp(0) : System::IServiceProvider'
Don't worry about that internal error message, just comment the preprocessor line:
#include "wtypes.h"
and you'll overcome it, at least it worked just fine for me. OK!
Perhaps your next question would be ... Why does it happen in that way? Well, it could be a good matter for another thread.
I need to use "wtypes.h" because I have legacy code in my project that uses "LOGPALETTE" and "wsprintf".
How I can use that without have this error?
\Vc7\PlatformSDK\Include\ServProv.h(93) : error C2872: 'IServiceProvider' : ambiguous symbol could be '\Vc7\PlatformSDK\Include\ServProv.h(48) : System::IServiceProvider IServiceProvider' or 'Stdafx.cpp(0) : System::IServiceProvider'
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.