運行MATLAB代碼我編譯使用MATLAB 2013 我可以在我的dll看到一個小節目: Test.TestMethods
我所有的功能從點網
我已經添加了它作爲我的點網項目的引用,並從matlab bin \ win64 \ v2.0文件夾中添加了MWArray
dll。
**更新:在這條線的matlabe的應用壓碎生成的代碼:
mcr= new MWMCR("", ctfFilePath, embeddedCtfStream, true);
如果我嵌入CTF文件 - 這將粉碎,如果我不把它嵌入,它會拋出一個例外。
我已經把我的計劃,以建立針對X64。
有一次,我嘗試創建對象:
Test.TestMethods test = new Test.TestMethods();
我的應用程序崩潰。 我只能在外部的Visual Studio實例看:
Unhandled exception at 0x0000000001D36E60 (m_interpreter.dll).
Access violation reading location 0x00000000A5CE3920.
我不知道從哪裏開始....
EDIT1:這是構造函數(也有靜態cctor):
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 20 (0x14)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldsfld class [mscorlib]System.Exception Test.TestMethods::ex_
IL_000b: brfalse.s IL_0013
IL_000d: ldsfld class [mscorlib]System.Exception Test.TestMethods::ex_
IL_0012: throw
IL_0013: ret
} // end of method TestMethods::.ctor
你的問題有點含糊。什麼是「Test.TestMethods」? 'MWArray'是一個託管的DLL或本地?你如何調用'MWArray'?你能從'TestMethods's'構造函數發佈代碼嗎? –
這是matlab編譯器生成的函數。我可以嘗試ildisasmble吧.. – Dani
嗯也只是確保你已經複製了所有的依賴到您當前的工作目錄(亦即。'MWArray'可能對目前在MATLAB文件夾中的其他DLL的一個依賴項)。嘗試複製所有的dll,看看是否有所作爲。 –