0
我創建了一個我想在windows中玩的cocos2d-x 3.0 RC項目。我已經添加了諸如CocosDension,libExtensions,libNetwork,libCurl等庫到我的項目中,因爲遊戲需要這些庫。當我編譯一切工作正常,但是當我嘗試運行時,我得到以下運行時錯誤。下面提到的是拋出的異常。爲windows phone 8編譯原生代碼(C++)
類型「System.IO.FileNotFoundException」的異常出現在 PhoneDirect3DXamlAppInterop.DLL但在用戶代碼中沒有處理。如果 有這種異常的處理程序,該程序可能會繼續安全 。
這種特殊的異常被拋出下面的代碼塊
private void DrawingSurfaceBackground_Loaded(object sender, RoutedEventArgs e)
{
if (m_d3dInterop == null)
{
m_d3dInterop = new Direct3DInterop();
// Set WindowBounds to size of DrawingSurface
m_d3dInterop.WindowBounds = new Windows.Foundation.Size(
(float)Application.Current.Host.Content.ActualWidth,
(float)Application.Current.Host.Content.ActualHeight
);
// Hook-up native component to DrawingSurfaceBackgroundGrid
DrawingSurfaceBackground.SetBackgroundContentProvider(m_d3dInterop.CreateContentProvider());
DrawingSurfaceBackground.SetBackgroundManipulationHandler(m_d3dInterop);
// Hook-up Cocos2d-x delegates
m_d3dInterop.SetCocos2dEventDelegate(OnCocos2dEvent);
m_d3dInterop.SetCocos2dMessageBoxDelegate(OnCocos2dMessageBoxEvent);`
m_d3dInterop.SetCocos2dEditBoxDelegate(OpenEditBox);
}
}
的例外是在行拋出
m_d3dInterop = new Direct3DInterop();
我也把錯誤日誌下面
The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
at PhoneDirect3DXamlAppComponent.Direct3DInterop..ctor()
at PhoneDirect3DXamlAppInterop.MainPage.DrawingSurfaceBackground_Loaded(Object sender, RoutedEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
如果有人有任何想法註冊相同,請幫助