Error compliing Matlab DLL wrapper

2 vues (au cours des 30 derniers jours)
Michele
Michele le 11 Fév 2025
Réponse apportée : Michele le 17 Fév 2025
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 commentaire
Michele
Michele le 11 Fév 2025
sounds like it's mandatory to install Windows SDK

Connectez-vous pour commenter.

Réponse acceptée

Michele
Michele le 17 Fév 2025
remove
CMDLINE250="mt -outputresource:$EXE';'2 -manifest $MANIFEST"
since the manifest file is not produced by the compiler.

Plus de réponses (0)

Tags

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by