NREL / SAM

System Advisor Model (SAM)
BSD 3-Clause "New" or "Revised" License
345 stars 143 forks source link

Code Generator providing incorrect sscapi.h - Matlab code generation fails #1918

Open sjanzou opened 6 days ago

sjanzou commented 6 days ago

See discussion at https://sam.nrel.gov/forum/forum-sdk/4788-matlab-and-ssc-library.html

sjanzou commented 6 days ago

To fix, include the latest sscapi.h file into the x64 folder with the ssc.dll file in the distribution and then MATLAB will find the exported function.

For completeness, please add sscall('unload'); to the beginning of the generated Matlab code to ensure the correct ssc.dll is loaded; e.g.

clear ssccall('unload'); ssccall('load');