Errors during build using rtwsfunc.tlc as system target file "An installed compiler was not detected"

6 views (last 30 days)
Currently, I am working on validation SiL using S-Functions for an Autosar Model. To start off, I tried to build an S-Function using rtwsfcn.tlc as system target file for a demo model 'rtwdemo_autosar_multirunnables' but when I build I get the following error :
'An installed compiler was not detected. Certain simulation modes, as well as host-based coder builds require that a compiler be installed'
Has anyone before experienced this kind of error? could you help me please to fix this issue?
Thanks in advance,

Answers (1)

Kajal Bansala
Kajal Bansala on 10 Mar 2021
Hello Soufian,
This issue could arise due to multiple reasons.
The issue could be with the compiler. Reinstalling the compiler from Add-ons tab may resolve the issue.
The compiler settings are not set to default in the custom template makefile (i.e., you have not specified any particular compiler/toolchain within the TMF)
There is mismatch between the compiler set with mex -setup and the compiler tool chain specified within the TMF. For instance:
>> mex -setup
MEX configured to use 'Microsoft Visual C++ 2013 (C)' for C language compilation
but in the TMF:
COMPILER_TOOL_CHAIN = lcc
In order to avoid this, you should specify:
COMPILER_TOOL_CHAIN = default
in the TMF.
This could also happen when the value of the system environment variable PATH is empty or "nearly empty", the above error message may arise. Please ensure that the PATH variable at least contains
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
The above string does need to be present in the PATH variable as Windows uses this to look for existing DLLs.
The %SystemRoot% variable is a special system-wide environment variable found on Microsoft Windows. To obtain the actual string value of %SystemRoot%, please type the following command in the Windows command prompt (cmd):
echo %systemroot%
This will give you the root directory of your Windows system files.

Categories

Find more on Simulink Coder 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!