MATLAB Compiler Deploytool Error (converting to use with C++) with 2010b
2 views (last 30 days)
Show older comments
I am getting the following error when I use the deploytool to build a set of files that can be used by a C++ application. The following is the log for the error:
-----------------
ant:
<mkdir dir="J:\Work\MagicExample\MagicExample\distrib" />
<mkdir dir="J:\Work\MagicExample\MagicExample\src" />
mcc -W cpplib:MagicExample -T link:lib -d J:\Work\MagicExample\MagicExample\src -w enable:specified_file_mismatch -w enable:repeated_file -w enable:switch_ignored -w enable:missing_lib_sentinel -w enable:demo_license -v J:\Work\MagicExample\magicsquare.m
Compiler version: 4.14 (R2010b)
Processing include files...
2 item(s) added.
Processing directories installed with MCR...
The file J:\Work\MagicExample\MagicExample\src\mccExcludedFiles.log contains a list of functions excluded from the CTF archive.
2 item(s) added.
Generating MATLAB path for the compiled application...
Created 42 path items.
Begin validation of MEX files: Thu Apr 26 22:27:54 2012
End validation of MEX files: Thu Apr 26 22:27:54 2012
Parsing file "J:\Work\MagicExample\magicsquare.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2010b\toolbox\compiler\deploy\deployprint.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2010b\toolbox\compiler\deploy\printdlg.m"
(Referenced from: "Compiler Command Line").
Deleting 0 temporary MEX authorization files.
Generating file "J:\Work\MagicExample\MagicExample\src\MagicExample.h".
Generating file "J:\Work\MagicExample\MagicExample\src\MagicExample.cpp".
Generating file "J:\Work\MagicExample\MagicExample\src\MagicExample.exports".
Generating file "J:\Work\MagicExample\MagicExample\src\readme.txt".
Executing command: ""C:\Program Files\MATLAB\R2010b\bin\mbuild" -O -v -output "MagicExample" -I"J:\Work\MagicExample\MagicExample\src" "J:\Work\MagicExample\MagicExample\src\MagicExample.cpp" "J:\Work\MagicExample\MagicExample\src\MagicExample.exports" -link shared -outdir "J:\Work\MagicExample\MagicExample\src""
-> Default options filename found in C:\Users\J & Heather\AppData\Roaming\MathWorks\MATLAB\R2010b
----------------------------------------------------------------
-> Options file = C:\Users\J & Heather\AppData\Roaming\MathWorks\MATLAB\R2010b\compopts.bat
-> COMPILER = cl
-> Compiler flags:
COMPFLAGS = -MD -c -Zp8 -GR -W3 -EHsc- -Zc:wchar_t- -nologo -I"C:\PROGRA~1\MATLAB\R2010b\extern\include\win64" -DMSVC -DIBMPC /D_SECURE_SCL=0 /D_CRT_SECURE_NO_DEPRECATE
OPTIMFLAGS = -O2 -DNDEBUG
DEBUGFLAGS = -Z7
arguments = -IJ:\Work\MagicExample\MagicExample\src
Name switch = /Fo
-> Pre-linking commands =
-> LINKER = link
-> Link directives:
LINKFLAGS = /MACHINE:AMD64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /LIBPATH:"C:\PROGRA~1\MATLAB\R2010b\extern\lib\win64\microsoft" /nologo /manifest /manifestfile:"J:\Work\MagicExample\MagicExample\src\MagicExample.msvc.manifest" mclmcrrt.lib /dll /implib:"J:\Work\MagicExample\MagicExample\src\MagicExample.lib" /def:C:\Users\J&HEAT~1\AppData\Local\Temp\mbuild_OF7EGy\templib.def
LINKFLAGSPOST =
Name directive = /out:"J:\Work\MagicExample\MagicExample\src\MagicExample.dll"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler = rc /fo "J:\Work\MagicExample\MagicExample\src\.res"
-> Resource Linker =
----------------------------------------------------------------
--> cl -IJ:\Work\MagicExample\MagicExample\src -MD -c -Zp8 -GR -W3 -EHsc- -Zc:wchar_t- -nologo -I"C:\PROGRA~1\MATLAB\R2010b\extern\include\win64" -DMSVC -DIBMPC /D_SECURE_SCL=0 /D_CRT_SECURE_NO_DEPRECATE /FoC:\Users\J&HEAT~1\AppData\Local\Temp\mbuild_OF7EGy\MagicExample.obj -IC:\PROGRA~1\MATLAB\R2010b\extern\include -IC:\PROGRA~1\MATLAB\R2010b\simulink\include -O2 -DNDEBUG J:\Work\MagicExample\MagicExample\src\MagicExample.cpp
MagicExample.cpp
--> type C:\Users\J&HEAT~1\AppData\Local\Temp\mbuild_OF7EGy\mbuild_tmp.exports | "C:\PROGRA~1\MATLAB\R2010b\sys\perl\win32\bin\perl.exe" -e "print \"LIBRARY MagicExample.dll\nEXPORTS\n\"; while (<>) {print;}" > C:\Users\J&HEAT~1\AppData\Local\Temp\mbuild_OF7EGy\templib.def
The system cannot find the file specified.
The system cannot find the path specified.
Contents of C:\Users\J&HEAT~1\AppData\Local\Temp\mbuild_OF7EGy\mbuild_tmp.rsp:
C:\Users\J&HEAT~1\AppData\Local\Temp\mbuild_OF7EGy\MagicExample.obj
--> link /out:"J:\Work\MagicExample\MagicExample\src\MagicExample.dll" /MACHINE:AMD64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /LIBPATH:"C:\PROGRA~1\MATLAB\R2010b\extern\lib\win64\microsoft" /nologo /manifest /manifestfile:"J:\Work\MagicExample\MagicExample\src\MagicExample.msvc.manifest" mclmcrrt.lib /dll /implib:"J:\Work\MagicExample\MagicExample\src\MagicExample.lib" /def:C:\Users\J&HEAT~1\AppData\Local\Temp\mbuild_OF7EGy\templib.def @C:\Users\J&HEAT~1\AppData\Local\Temp\mbuild_OF7EGy\mbuild_tmp.rsp
LINK : fatal error LNK1104: cannot open file 'C:\Users\J&HEAT~1\AppData\Local\Temp\mbuild_OF7EGy\templib.def'
C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Link of 'J:\Work\MagicExample\MagicExample\src\MagicExample.dll' failed.
Error: An error occurred while shelling out to mbuild (error code = 2).
Unable to build executable.
-----------------
I'm not quite sure where I am going wrong - can anyone help?
1 Comment
Kaustubha Govind
on 27 Apr 2012
Could you try starting MATLAB as administrator and see if the error goes away?
Answers (0)
See Also
Categories
Find more on C Shared Library Integration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!