MATLAB: Matlab Codegen returns “CRL: “ANSI_C” cannot be found in the registry.”

ansi_ccodegenMATLABmatlab coderr2012bubuntu 12.04

Good afternoon,
I'm running into an error using the Matlab Codegen tools. When I invoke 'codegen', I always get back the following error:
CRL: "ANSI_C" cannot be found in the registry.
Use help codegen for more information on using this command.
Error using codegen
My Matlab skills aren't that strong, and I've exhaused my Google-fu with regards to this error message. I did try reinstalling Matlab — no luck.
I'm running Matlab 2012B on Ubuntu 12.04. Matlab 2012B is for historical reasons (original project used this).

Best Answer

Turns out that Matlab 2012B only supports gcc-4.4 and will not attempt to use any higher version of gcc.
sudo apt-get install gcc-4.4