This error will be present whenever the MATLAB® software pulls a wrong version for the GCC Compiler instead of the required WinGW-W64.
The first thing you need to do is to verify you're installing all the software and components needed to generate a Simulink® model for a Windows target.
If the error still persist, please follow these steps:
1. Install the correct MinGW-w64 - for 32&64 bit Windows Compiler for VeriStand:
- Download the MinGW-w64 - for 32 and 64 bit Windows (NOTE: please wait for the download to start automatically)
- To install the MinGW-w64 compiler you just need to unzip the "x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z" file to any location where you can run executables with your Windows User. If you’re not sure where you can do this, please ask your IT department.
- Edit the System Environment Variables:
- Navigate to the System Environment Variables (Windows Start » Control Panel » System » Advanced » Environment Variables)
- Add a new System Variable with the Variable Name NI_MINGW_WIN32
- The variable value must be the path pointing to the bin directory of the downloaded and unzipped "x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z" where the gcc.exe is located which is the correct GCC Compiler for Veristand for the compilation of Models for the Windows OS.
- For example "C:\VeriStand\2019\ModelInterface\mingw64\bin"
- So we would want it to look like this for example:
2. Restart your computer
3. You can now compile a Windows compatible model for use in VeriStand by selecting VeriStand.tlc as the compiler, and VeriStand Compiler for Windows Targets as the toolchain. This process is described in the VeriStand manual.