MATLAB Answers

Why does running Simulink in rapid acceleration mode cause a compiler error indicating that the line is too long?

28 views (last 30 days)
I have a model that I would like to run in rapid acceleration mode. However, when I attempt to run it, I get a compiler error, culminating in the following lines:
model_name.c:134 compiler limit: line too long (more than 20197 chars)
gmake: *** [model_name.obj] Error 1
I tried moving the files to a shorter directory, but that had no effect. What is causing this issue?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 31 Mar 2020
This error may occur if the you do not have any installed/configured compilers (as may be verified by the output of the command "mex -setup"), in which case MATLAB defaults to lcc.
The issue can be corrected by installing a supported compiler. Supported compilers are listed in the documentation at the following link:

  1 Comment

Daran Smalley
Daran Smalley on 29 Jan 2020
As MinGW is a supporeted compiler and this issue is still arrising, there must be another reason.
Is there any update, this occurs in 2018b and 2019b

Sign in to comment.

More Answers (2)

Antonio Carlo Bertolino
Antonio Carlo Bertolino on 17 Feb 2019
I have installed the supported compiler suggested in the link, indeed when i type
mex -setup
the answer is
>> mex -setup
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required
to update your code to utilize the new API.
You can find more information about this at:
https://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
>>
but still I get the same error when trying to compile my model in rapid accelerator mode:
cpp: test_bench_17feb19_capi.c:855 compiler limit: line too long (more than 19709 chars)
gmake: *** [Test_bench_17feb19_capi.obj] Error 1
### Build procedure for model: 'Test_bench_17feb19' aborted due to an error.
What should I do to solve this problem?
Thank you,
Antonio

  0 Comments

Sign in to comment.


Giovanni Sartori
Giovanni Sartori on 10 Nov 2020 at 7:16
As others have reported, I have installed a supported compiler (specifically MinGW, I'm using Windows 10 and Matlab 2020a), and the problem still arises.

  0 Comments

Sign in to comment.

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!