Why do I receive 'NMAKE : fatal error U1095: expanded command line too long' error when using MCC in MATLAB Compiler 4.16 (R2011b)?

6 views (last 30 days)
When I try to use MCC in MATLAB Compiler 4.16 (R2011b), I get the following error:
NMAKE : fatal error U1095: expanded command line 'mcc -W lib:...... -T link:lib -v .....
.....................
.....................
.....................
-a .....
-a ...... ' too long
Stop.
Note that the long error message was intentionally truncated to fit on the page, and specific customer's matlab files are replaced by '....'

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 28 Feb 2012
The reason that is causing the problem is that the customer is using a makefile script to compile his MATLAB code. In this script, he pulls in all the necessary MATLAB files, but there are too many of them and eventually NMAKE complains about the argument being passed to it is too long.
NMAKE is a Microsoft build tool.
As a solution to this problem, when using MCC, include the directory that contains the MATLAB files instead of each individual files, such as:
>> mcc -mv magicsquare.m -a './MatlabFileDirectory'
where "MatlabFileDirectory" contains all the necessary MATLAB files.

More Answers (0)

Categories

Find more on Package MATLAB Functions in Help Center and File Exchange

Products


Release

R2011b

Community Treasure Hunt

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

Start Hunting!