The issue has been resolved. For people who are facing the same problem:
- The Siemens WinAC (example) documentation only uses Matlab2012b, consider compiling your model on the 2012b version of Matlab when you're using a different version;
In the Matlab Workspace cd
your way to C:\Program Files\Siemens\WinAC\WinAC Target\WinAC Target Files
and run the startup.m
-file;
DO NOT change the current searchpath location;
DO NOT paste any other source files to this location otherwise you confuse the compiler wich file to take;
In my case I got the following errors:
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(343) : error C2065: 'ODK_YEAR_MAX' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(343) : error C2065: 'ODK_YEAR_MIN' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(346) : error C2065: 'ODK_MON_MAX' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(346) : error C2065: 'ODK_MON_MIN' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(349) : error C2065: 'ODK_DAY_MAX' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(349) : error C2065: 'ODK_DAY_MIN' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(352) : error C2065: 'ODK_HOUR_MAX' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(352) : error C2065: 'ODK_HOUR_MIN' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(355) : error C2065: 'ODK_MIN_MAX' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(355) : error C2065: 'ODK_MIN_MIN' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(358) : error C2065: 'ODK_SEC_MAX' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(358) : error C2065: 'ODK_SEC_MIN' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(361) : error C2065: 'ODK_MILLI_MAX' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(361) : error C2065: 'ODK_MILLI_MIN' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(364) : error C2065: 'ODK_WDAY_MAX' : undeclared identifier
C:\PROGRA~1\Siemens\WinAC\WINACT~1\WINACT~1\src\WinLCReadWriteData.cpp(364) : error C2065: 'ODK_WDAY_MIN' : undeclared identifier
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
To silence this error open the WinLCReadWriteData.cpp
-file and comment out lines 343 to 365.
Now it compiles fine, without errors. External mode also works without issues.