Generate DLL from matlab R14SP3 and call by python 3.5
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!