MEX Issues during compilation
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have a Windows 10 64 bit system with MATLAB 2013b installed on it. Now i am using SDK 7.1 compiler to compile a c++ program. This works fine in that it has created the "XXX.mexw64" file. But when i run that file, i receive the error message: Invalid MEX-file: The specified module could not be found. What could be wrong and where?
Here is the MEX command and the error:
function make()
mex -largeArrayDims -v -g -I. ../MATLAB_USRP_INTERFACE/uhdinterface.cpp ../MATLAB_USRP_INTERFACE/tx_functions.cpp ../MATLAB_USRP_INTERFACE/rx_functions.cpp ../MATLAB_USRP_INTERFACE/mexutil.cpp ../MATLAB_USRP_INTERFACE/uhd_functions.cpp ../MATLAB_USRP_INTERFACE/storage.cpp -L."C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft" libboost_thread-vc100-mt-1_55.lib libboost_date_time-vc100-mt-1_55.lib libboost_system-vc100-mt-1_55.lib libboost_chrono-vc100-mt-1_55.lib uhd.lib libmx.lib libmex.lib libmat.lib
% mex -g uhd.lib -I. ../MATLAB_USRP_INTERFACE/uhdinterface.cpp ../MATLAB_USRP_INTERFACE/tx_functions.cpp ../MATLAB_USRP_INTERFACE/rx_functions.cpp ../MATLAB_USRP_INTERFACE/mexutil.cpp ../MATLAB_USRP_INTERFACE/uhd_functions.cpp ../MATLAB_USRP_INTERFACE/storage.cpp
end
Error:
make
-> Default options filename found in C:\Users\VINAYAK KARANDIKAR\AppData\Roaming\MathWorks\MATLAB\R2013b
----------------------------------------------------------------
-> Options file = C:\Users\VINAYAK KARANDIKAR\AppData\Roaming\MathWorks\MATLAB\R2013b\mexopts.bat
MATLAB = C:\Program Files\MATLAB\R2013b
-> COMPILER = cl
-> Compiler flags:
COMPFLAGS = /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD
OPTIMFLAGS = /O2 /Oy- /DNDEBUG
DEBUGFLAGS = /Z7
arguments = -I.
Name switch = /Fo
-> Pre-linking commands =
-> LINKER = link
-> Link directives:
LINKFLAGS = /dll /export:mexFunction /LIBPATH:"C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib /MACHINE:X64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /manifest /incremental:NO /implib:"C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\templib.x" /MAP:"uhdinterface.mexw64.map"
LINKDEBUGFLAGS = /debug /PDB:"uhdinterface.mexw64.pdb"
LINKFLAGSPOST =
Name directive = /out:"uhdinterface.mexw64"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler = rc /fo "mexversion.res"
-> Resource Linker =
----------------------------------------------------------------
--> cl -I. /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /FoC:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\uhdinterface.obj -I"C:\Program Files\MATLAB\R2013b\extern\include" -I"C:\Program Files\MATLAB\R2013b\simulink\include" /Z7 ..\MATLAB_USRP_INTERFACE\uhdinterface.cpp
uhdinterface.cpp
..\MATLAB_USRP_INTERFACE\uhdinterface.cpp(173) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
--> cl -I. /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /FoC:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\tx_functions.obj -I"C:\Program Files\MATLAB\R2013b\extern\include" -I"C:\Program Files\MATLAB\R2013b\simulink\include" /Z7 ..\MATLAB_USRP_INTERFACE\tx_functions.cpp
tx_functions.cpp
--> cl -I. /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /FoC:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\rx_functions.obj -I"C:\Program Files\MATLAB\R2013b\extern\include" -I"C:\Program Files\MATLAB\R2013b\simulink\include" /Z7 ..\MATLAB_USRP_INTERFACE\rx_functions.cpp
rx_functions.cpp
--> cl -I. /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /FoC:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\mexutil.obj -I"C:\Program Files\MATLAB\R2013b\extern\include" -I"C:\Program Files\MATLAB\R2013b\simulink\include" /Z7 ..\MATLAB_USRP_INTERFACE\mexutil.cpp
mexutil.cpp
--> cl -I. /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /FoC:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\uhd_functions.obj -I"C:\Program Files\MATLAB\R2013b\extern\include" -I"C:\Program Files\MATLAB\R2013b\simulink\include" /Z7 ..\MATLAB_USRP_INTERFACE\uhd_functions.cpp
uhd_functions.cpp
..\MATLAB_USRP_INTERFACE\uhd_functions.cpp(31) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
--> cl -I. /c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /FoC:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\storage.obj -I"C:\Program Files\MATLAB\R2013b\extern\include" -I"C:\Program Files\MATLAB\R2013b\simulink\include" /Z7 ..\MATLAB_USRP_INTERFACE\storage.cpp
storage.cpp
..\MATLAB_USRP_INTERFACE\storage.cpp(63) : warning C4267: 'argument' : conversion from 'size_t' to 'const int', possible loss of data
..\MATLAB_USRP_INTERFACE\storage.cpp(69) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
Contents of C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\mex_tmp.rsp:
C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\uhdinterface.obj C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\tx_functions.obj C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\rx_functions.obj C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\mexutil.obj C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\uhd_functions.obj C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\storage.obj libboost_thread-vc100-mt-1_55.lib libboost_date_time-vc100-mt-1_55.lib libboost_system-vc100-mt-1_55.lib libboost_chrono-vc100-mt-1_55.lib uhd.lib libmx.lib libmex.lib libmat.lib
--> link /out:"uhdinterface.mexw64" /debug /PDB:"uhdinterface.mexw64.pdb" /dll /export:mexFunction /LIBPATH:"C:\Program Files\MATLAB\R2013b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib /MACHINE:X64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /manifest /incremental:NO /implib:"C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\templib.x" /MAP:"uhdinterface.mexw64.map" @C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\mex_tmp.rsp
Creating library C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\templib.x and object C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\templib.exp
--> del "C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\templib.x" "C:\Users\VINAYA~1\AppData\Local\Temp\mex_GCWHwX\templib.exp"
--> mt -outputresource:"uhdinterface.mexw64;2" -manifest "uhdinterface.mexw64.manifest"
Microsoft (R) Manifest Tool version 6.1.7716.0
Copyright (c) Microsoft Corporation 2009.
All rights reserved.
--> del "uhdinterface.mexw64.manifest"
--> del "uhdinterface.mexw64.map"
Invalid MEX-file 'C:\Users\VINAYAK
KARANDIKAR\Documents\MATLAB\MATLAB\Thesis\MATLAB_USRP_INTERFACE\uhdinterface.mexw64': The
specified module could not be found.
Respuestas (0)
Ver también
Categorías
Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!