Errors Generating .DLL for Windows from Simulink Model using VeriStand 2018, MinGW, and MATLAB

Updated Feb 2, 2021

Reported In


  • VeriStand 2018 SP1

Issue Details

I am attempting to create a .DLL for Windows from a Simulink model I created in MATLAB R2017b or later using VeriStand 2019 R2 or earlier using the procedure outlined in VeriStand's help documentation. I am using MinGW as my compiler, but when I attempt to build my .DLL using the sbuild command, I receive build errors referencing missing members ("Unable to find members within the CGType scope") or issues using certain .DLLs ("Error using tlc_new"). 


If you're attempting to use the MinGW compiler with VeriStand 2019 R2 or earlier, you're likely encountering a compatibility issue between VeriStand, MATLAB, and MinGW. MinGW is only compatible with VeriStand 2019 R3 or later, while the latest version of MATLAB compatible with VeriStand 2019 R2 or earlier is MATLAB 2018a. This compatibility chart is the best resource for determining which compilers and versions of VeriStand/MATLAB you will need to compile Simulink models into .DLLs for different operating systems. In this particular case, you would need to either upgrade VeriStand to 2019 R3 or later, or install and use the Windows SDK 7.1 compiler to compile your model.