I'm trying to compile and run Simulink models on a 32-bit Windows machine which I already know run just fine on a 64-bit Linux machine. The models won't compile, however, giving me exceptionally helpful errors like "Error(s) encountered while building model". When I turn on the verbose accelerator builds, I get a little bit more detail in the command window, with error messages like "ACFT_ENV_Atm_mdllib.lib : fatal error LNK1127: library is corrupt". (ACFT_ENV_Atm being the name of a model file). Anyone ever seen anything like this before?
I'm not sure if this is a related problem or not, but it looks to me like when Simulink is compiling, it's using the LCC default compiler even though I have a different C compiler selected under "mex -setup". At first I was trying to use Visual Studio 2005, but since that isn't on the official list of supported compilers anymore, I went out and got the latest Windows SDK 7.1. When I select either of these under "mex -setup", however, the verbose accelerator build still spits out a lot of lines like "C:/PROGRA~1/MATLAB/R2013a\sys\lcc\bin\lcc" and none at all referencing the location of the compiler, so I have to assume that it's not obeying the selection that I made under "mex -setup". Is there a different place to set compiler options for Simulink? I always thought that Simulink still used the "mex -setup" options, and I could swear that I successfully used that before in R2012a or R2012b. (The Microsoft compilers made my models run much faster than LCC).