Generate DLL from matlab R14SP3 and call by python 3.5
1 次查看(过去 30 天)
显示 更早的评论
I have some matlab code (split over 4 files test.m, a.m, b.m, c.m) from which I'd like to generate DLL file to be called by external application. The main function test(x, y, z) in test.m contains three inputs of type string without any output argument - it writes some data into a file and standard output.
I'm generating the from matlab DLL with:
mcc -B csharedlib:testLib test.m a.m b.m c.m
I'm receiving some files and DLL.
Now I'm calling this DLL by following python code:
from ctypes import *
mydll = cdll.LoadLibrary("testLib.dll")
mydll.test("string1", "string2", "string3")
On the 2nd line I'm getting following error: "OSError: [WinError 193] %1 is not a valid Win32 application"
My environment is Win7, 64 bit
Any idea where there is a problem?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!