Found workaround, but unfourtunately breaks base-MATLAB and is device specific. I asked Mathworks for help with a more elegant solution now that I have a better idea of what the problem is.
1) Created prototype file by modifying this line in icdevice.m.
[~, warninginfo]= loadlibrary(binary, includeFile, 'mfilename', 'VS', 'alias', driverName, ...
includepath', primaryPath,'includepath', char(secondaryPath(1)), 'includepath', char(secondaryPath(2)));
2) Modified icdevice.m to call prototype if deployed.
if isdeployed
[~, warninginfo]= loadlibrary(binary, @VS, 'alias', driverName, ...
'includepath', primaryPath,'includepath', char(secondaryPath(1)), 'includepath', char(secondaryPath(2)));
else
[~, warninginfo]= loadlibrary(binary, includeFile, 'alias', driverName, ...
'includepath', primaryPath,'includepath', char(secondaryPath(1)), 'includepath', char(secondaryPath(2)));
end
Best Answer