Error compliing Matlab DLL wrapper

조회 수: 2 (최근 30일)
Michele
Michele 2025년 2월 11일
답변: Michele 2025년 2월 17일
I'm trying to create a DLL from a script and a matching wrapper (I need to use the DLL inside LabView so I have to adapt function parameters).
When I try to compile the wrapper:
mbuild -v A0007121_3LIV_W.c A0007121_3LIV.lib LINKFLAGS="$LINKFLAGS /DLL /DEF:A0007121_3LIV_W.def" LDEXT=".dll" CMDLINE250="mt -outputresource:$EXE';'2 -manifest $MANIFEST"
I got this:
Verbose mode is on.
... Looking for compiler 'MinGW64 Compiler (C)' ...
... Looking for environment variable 'MW_MINGW64_LOC' ...Yes ('C:\mingw64').
... Looking for file 'C:\mingw64\bin\gcc.exe' ...Yes.
... Looking for folder 'C:\mingw64' ...Yes.
[..]
Building with 'MinGW64 Compiler (C)'.
C:\mingw64\bin\gcc -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -m64 -I"C:\Program Files\MATLAB\R2019b/extern/include" -I"C:\Program Files\MATLAB\R2019b/simulink/include" -I"C:\Program Files\MATLAB\R2019b/extern\lib\win64\mingw64" -I"C:\Program Files\MATLAB\R2019b\extern\include\win64" -fexceptions -fno-omit-frame-pointer -O2 -fwrapv -DNDEBUG "C:\Users\m.santucci\Documents\MATLAB\SIRIO\A0007121_3LIV\A0007121_3LIV_W.c" -o C:\Users\MAB0B~1.SAN\AppData\Local\Temp\6\mex_4570076701069761_3604\A0007121_3LIV_W.obj
C:\mingw64\bin\gcc -m64 -Wl,--no-undefined,--out-implib,"A0007121_3LIV_W.lib" -s C:\Users\MAB0B~1.SAN\AppData\Local\Temp\6\mex_4570076701069761_3604\A0007121_3LIV_W.obj A0007121_3LIV.lib -L"C:\Program Files\MATLAB\R2019b\extern\lib\win64\mingw64" -lmclmcrrt -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -o A0007121_3LIV_W.dll
mt -outputresource:A0007121_3LIV_W.dll;2 -manifest "A0007121_3LIV_W.dll.manifest"
Error using mbuild (line 166)
Unable to complete successfully.
'mt' is not recognized as an internal or external command,
operable program or batch file.
I'm using MinGW-W64 6.3.0
  댓글 수: 1
Michele
Michele 2025년 2월 11일
sounds like it's mandatory to install Windows SDK

댓글을 달려면 로그인하십시오.

채택된 답변

Michele
Michele 2025년 2월 17일
remove
CMDLINE250="mt -outputresource:$EXE';'2 -manifest $MANIFEST"
since the manifest file is not produced by the compiler.

추가 답변 (0개)

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by