Why do I receive the error message "An installed compiler was not detected" when compiling a model for xPC Target 5.2 (R2012a)?

35 views (last 30 days)
When trying to compile my model for xPC Target applications, I receive the error message
An installed compiler was not detected. Certain simulation modes, as well as host-based coder builds require that a compiler be installed. Please install one of the supported compilers for this release as listed at:
Unable to locate specified compiler for xPC Target
MATLAB must be restarted after the compiler is installed
Below are workarounds I have tried:
1.I have selected a compiler (SDK 7.1) through 'mex –setup' and verified that the compiler information is registered by executing the command 'mex.getCompilerConfigurations'.
2. I have also executed the command 'xpcsetcc –setup' to select SDK 7.1 as the compiler for xPC target. The same compiler and compiler path is specified in the xPC Explorer GUI.
3.I have the system environment variable 'VS100COMNTOOLS' and it has a non-empty value of 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\'.
4.Building the xPC demo model 'xpcosc' results in the above same error message.
5.Building the Simulink demo model 'vdp' results in the following error message
'cmd' is not recognized as an internal or external command,
operable program or batch file.
gmake: *** [../vdp.exe] Error 1
### Build procedure for model: 'vdp' aborted due to an error.
6.Strangely, I am able to mex yprime.c to create yprime.mexw32.
7.I have re-installed MATLAB, SDK 7.1, Visual C++ 2010 but it did not resolve the issue.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 30 Jul 2013
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.

More Answers (0)

Categories

Find more on Multicore Processor Targets in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!