Я скачал этот проект C ++ по этой ссылке: http://www.codeproject.com/Articles/9903/Calling-Managed-Code-from-Unmanaged-Code-and-vice
А потом попробуйте скомпилировать его с помощью Visual Studio 2010, у меня возникли некоторые проблемы:
Error 3 error LNK2028: unresolved token (0A00000F) "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z) referenced in function "public: __clrcall Managed_Wrapper::Managed_Wrapper_Class::Managed_Wrapper_Class(void)" (??0Managed_Wrapper_Class@Managed_Wrapper@@$$FQ$AAM@XZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\Managed_Wrapper.obj Managed_Wrapper
Error 4 error LNK2028: unresolved token (0A000010) "void * __cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z) referenced in function "public: __clrcall Managed_Wrapper::Managed_Wrapper_Class::Managed_Wrapper_Class(void)" (??0Managed_Wrapper_Class@Managed_Wrapper@@$$FQ$AAM@XZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\Managed_Wrapper.obj Managed_Wrapper
Error 5 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\Stdafx.obj Managed_Wrapper
Error 6 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\Unmanaged.obj Managed_Wrapper
Error 7 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\Unmanaged.obj Managed_Wrapper
Error 8 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\AssemblyInfo.obj Managed_Wrapper
Error 9 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\AssemblyInfo.obj Managed_Wrapper
Error 10 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\Managed_Wrapper.obj Managed_Wrapper
Error 11 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\Managed_Wrapper.obj Managed_Wrapper
Error 12 error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z) referenced in function "public: __clrcall Managed_Wrapper::Managed_Wrapper_Class::Managed_Wrapper_Class(void)" (??0Managed_Wrapper_Class@Managed_Wrapper@@$$FQ$AAM@XZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\Managed_Wrapper.obj Managed_Wrapper
Error 13 error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z) referenced in function "public: __clrcall Managed_Wrapper::Managed_Wrapper_Class::Managed_Wrapper_Class(void)" (??0Managed_Wrapper_Class@Managed_Wrapper@@$$FQ$AAM@XZ) C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\Managed_Wrapper.obj Managed_Wrapper
Error 14 error LNK2001: unresolved external symbol __CorDllMain@12 C:\Users\310052290\Desktop\DemoProject\Managed_Wrapper\LINK Managed_Wrapper
Error 15 error LNK1120: 6 unresolved externals C:\Users\310052290\Desktop\DemoProject\Managed_VBdotNET\Release\Managed_Wrapper.dll Managed_Wrapper
Как я могу исправить проблемы компиляции проекта C ++ в Visual Studio 2010?
Заранее спасибо.