.. _matlab_cannot_find_compiler: Matlab Cannot Find Installed Compiler ============================================================ **Do not use ``mex -setup``.** ``mex -setup`` is used for setting the PC compiler for compiling S-functions. The embedded software compiler is set in the "Code Generation" tab in Simulink. To select your embedded compiler: 1. Open Simulink model. 2. Click "Simulation" > "Model Configuration Parameters". 3. Expand "Code Generation" or "Real-Time Workshop". 4. Select "OpenECU compiler selection". .. image:: matlab_cannot_find_compiler_img1.jpg If "Code Generation" or "Real-Time Workshop" isn't visible, you may not have a licensed Simulink Coder. Contact Mathworks for assistance. If the compiler is not in the dropdown, consider adding an environment variable for your compiler.