A problem about MATLAB R2011b Builder EX on XP and Win 7

I just tried the example of 'magic square'. I use microsoft visual studio 2010 as my compiler. I tested the example on my PC with XP and notebook with win 7. They happened the same problem (error code = 2). Please tell me how to fix it. Thanks.
The following is the error information.
LINK : fatal error LNK1181: cannot open input file 'Documents\MATLAB\xlmagic\src\xlmagic.def' D:\PROGRA~1\MATLAB\R2011B\BIN\MEX.PL: Error: Link of 'D:\MYDOCU~1\MATLAB\XLMAGIC\SRC\xlmagic_1_0.dll' failed. Error: An error occurred while shelling out to mbuild (error code = 2). Unable to build executable. Warning: mcc failed to create Excel Add-in "d:\My Documents\MATLAB\xlmagic\src\xlmagic.xla", you can manually create the Add-in by importing the .bas file into Excel.

 Accepted Answer

This looks like a bug due to a space present in the path where you are compiling for. Note how it says "cannot open input file 'Documents\MATLAB\xlmagic\src\xlmagic.def'" - it omits the path before the space in "My Documents". Try copying your example to a directory without spaces and compile from there. Also, please consider reporting this to MathWorks Tech Support.

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!