Problem creating Accelerator MEX file for simulink model in windows 10

25 views (last 30 days)
Hello,
I am trying to run a Simulink model in Accelerator mode in Windows 10 and I get the following error:
Problem creating Accelerator MEX file for model 'xxx'
Failed to build model 'xxx' using LCC in accelerator mode, please consider using MSVC instead.
This is an error I don't get when running the model in a different version of Windows. I've seem people with similar issues, but I haven't really found a clear solution or work around. Does anyone has an idea of what I could try to get the accelerator mode working in windows 10. It is worth mentioning, that I am using a work laptop and the admin rights are limited.
Thank you very much,
Luis Hurtado

Answers (3)

Quan Tao
Quan Tao on 2 Aug 2017
Assuming you did not see this problem before with the same model on other versions of Windows machines, it seems to be a platform-related, or more specifically, compiler-related issue.
A possible solution is to change to another compiler, as implied by the error message. To change the compiler type, at the MATLAB command prompt, type:
mex -setup
MATLAB displays a message with links to set up a different compiler. Please check if you can get the accelerator mode working with other compilers.
To learn more about how to set up a different compiler, please refer to the documentation page on Change Default Compiler.
You can also find out all supported compilers for the MATLAB release your are working with. For R2017a, please refer to Supported and Compatible Compilers for R2017a.

Marcos Victorio
Marcos Victorio on 9 Oct 2022
I got the same problem and after some tries I found out that the current folder of my command window wasn't the same where the mex file was saved. So I soved the problem by just changing the command window folder to the correct one.
  1 Comment
Odibert Eid
Odibert Eid on 8 Nov 2022
Hi, can you please write step-by-step instructions? I am facing a similar issue, and it isn't allowing us to finish our project for school.

Sign in to comment.


Lu Gao
Lu Gao on 16 Dec 2023
Hello I met the same problem and hope to get some help, many thanks.
I run a simulink model successfully in accelerator mode, but when I add a "mean" to a variable, I got the same error
Problem creating Accelerator MEX file for model 'xxx'
Failed to build model 'xxx' using LCC in accelerator mode, please consider using MSVC instead.
And if I run in normal mode, it also runs successfully.
  1 Comment
Marcos Victorio
Marcos Victorio on 16 Dec 2023
Have you tried changing the command window folder to the folder where your mex file is saved?
Are you sure the problem just happens when you add the mean block? It seems really strange to me.
Is your simulation in the continuous or discrete mode?
What have you set for the powergui block?

Sign in to comment.

Categories

Find more on Manual Performance Optimization 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!