Generate DLL from matlab R14SP3 and call by python 3.5

조회 수: 1 (최근 30일)
michael
michael 2020년 1월 12일
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개)

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

제품


릴리스

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by