Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
error code 53 when compiling

Subject: error code 53 when compiling

From: Krzysztof

Date: 4 Dec, 2009 04:05:19

Message: 1 of 4

Hello all,

I have been trying to deploy a file that is used in the example for using deploytool - magicsquare.m. However, I am getting:

Error: An error occurred while shelling out to mbuild (error code = 53).
Unable to build executable.
??? Error using ==> mcc
Error executing mcc, return status = 1 (0x1).

I was trying to find the nature of this error, but there is no explanation for error 53. My first suspect is a fact that MSVS 2008 SP1 is located in the x86 folder on the 64 bit machine. I do not know if there is a point in trying to reinstall VS and ensuring that 64 bit compiler is installed.

Bellow is a log from compilation:

Compiler version: 4.11 (R2009b)
Processing include files...
2 item(s) added.
Processing directories installed with MCR...
The file mccExcludedFiles.log contains a list of functions excluded from the CTF archive.
2 item(s) added.
Generating MATLAB path for the compiled application...
Created 40 path items.
Begin validation of MEX files: Thu Dec 03 22:15:24 2009
End validation of MEX files: Thu Dec 03 22:15:24 2009
Parsing file "C:\Users\XX\Documents\MATLAB\magicsquare.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2009b\toolbox\compiler\deploy\deployprint.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files\MATLAB\R2009b\toolbox\compiler\deploy\printdlg.m"
(Referenced from: "Compiler Command Line").
Deleting 0 temporary MEX authorization files.
Generating file "magicsquare_main.c".
Generating file "magicsquare_delay_load.c".
Generating file "C:\Users\XX\Documents\MATLAB\readme.txt".
Generating file "magicsquare_mcc_component_data.c".
Executing command: mbuild -O -v -output "magicsquare" "magicsquare_main.c" "magicsquare_delay_load.c" "magicsquare_mcc_component_data.c" -link exe -env MCR_DELAYLOAD=/delayload:mclmcrrt711.dll -env MCR_DELAYLIB=delayimp.lib
 This is mbuild Copyright 1984-2006 The MathWorks, Inc.
 
-> Default options filename found in C:\Users\XX\AppData\Roaming\MathWorks\MATLAB\R2009b
----------------------------------------------------------------
-> Options file = C:\Users\XX\AppData\Roaming\MathWorks\MATLAB\R2009b\compopts.bat
-> COMPILER = cl
-> Compiler flags:
         COMPFLAGS = -MD -c -Zp8 -GR -W3 -EHsc- -Zc:wchar_t- -nologo /D_CRT_SECURE_NO_DEPRECATE
         OPTIMFLAGS = -O2 -DNDEBUG
         DEBUGFLAGS = -Z7
         arguments =
         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\R2009b\extern\lib\win64\microsoft" /nologo /manifest /manifestfile:"magicsquare.msvc.manifest" mclmcrrt.lib delayimp.lib /delayload:mclmcrrt711.dll
         LINKFLAGSPOST =
         Name directive = /out:"magicsquare.exe"
         File link directive =
         Lib. link directive =
         Rsp file indicator = @
-> Resource Compiler = rc /fo ".res"
-> Resource Linker =
----------------------------------------------------------------
 
 
--> cl -MD -c -Zp8 -GR -W3 -EHsc- -Zc:wchar_t- -nologo /D_CRT_SECURE_NO_DEPRECATE /FoC:\USERS\KR\APPDATA\LOCAL\TEMP\MBUILD~2\magicsquare_main.obj -IC:\PROGRA~1\MATLAB\R2009b\extern\include -IC:\PROGRA~1\MATLAB\R2009b\simulink\include -O2 -DNDEBUG magicsquare_main.c
 
 
  C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: Compile of 'magicsquare_main.c' failed.
 
Error: An error occurred while shelling out to mbuild (error code = 53).
Unable to build executable.
??? Error using ==> mcc
Error executing mcc, return status = 1 (0x1).


Thank you in advance for any help.

Subject: error code 53 when compiling

From: Camille Couzi

Date: 25 Feb, 2011 15:47:07

Message: 2 of 4

Hi!
I am having exactly the same problem as you Krzysztof, when I compile a windows appear:
"Microsoft C/C++ Compiler Driver stopped to work, Windows can try to find a solution online"
and of course if I take one of the two options "search on line"/"close the program" matlab gives me the error you pasted on top...
Did you find the solution?

Thanks in advance!
Camille.

Subject: error code 53 when compiling

From: David

Date: 5 Aug, 2011 15:25:29

Message: 3 of 4

I'm also having the same problem. If anyone has the answer, it's be much appreciated.

Subject: error code 53 when compiling

From: Peter

Date: 6 Jun, 2012 18:57:09

Message: 4 of 4

I had the same problem and it was solved after installing Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 as described here:
http://www.mathworks.nl/support/solutions/en/data/1-6IJJ3L/?solution=1-6IJJ3L

Additionally, in the compopts.bat file I had to replace the line VSINSTALLDIR= with VSINSTALLDIR=%VS90COMNTOOLS%\..\.. otherwise the compiler wasn't found during compiling in Matlab.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us