Domanda

My Matlab coder was building stuff fine the last time I used (which was 2 months ago), but now when I try to build a project with it, I get the following error:

\>> coder -build get_scores.prj     
Warning: 'perl: warning: Setting locale failed.    
perl: warning: Please check that your locale settings:    
LC_ALL = "en_GB",    
LANG = (unset)    
are supported and installed on your system.    
perl: warning: Falling back to the standard locale ("C").    
VSINSTALLDIR'    
exceeds MATLAB's maximum name length of 63 characters and has been truncated to    
'perl: warning: Setting locale failed.    
perl: warning: Please che'.     
\> In CompilerConfigurationFactory>CompilerConfigurationFactory.determineLocation at 275    
In CompilerConfigurationFactory>CompilerConfigurationFactory.process at 130    
In getCompilerConfigurations at 56    
In C:\Program Files\MATLAB\R2011b\toolbox\coder\coder\private\compilerman.p>parse_opts_file at 57    
In C:\Program Files\MATLAB\R2011b\toolbox\coder\coder\private\compilerman.p>compilerman at 15    
In C:\Program Files\MATLAB\R2011b\toolbox\coder\coder\private\emlckernel.p>emlckernel/getCompilerName at 148    
In C:\Program Files\MATLAB\R2011b\toolbox\coder\coder\private\emlckernel.p>emlckernel/finalizeProject at 711    
In C:\Program Files\MATLAB\R2011b\toolbox\coder\coder\private\emlckernel.p>emlckernel at 36    
In C:\Program Files\MATLAB\R2011b\toolbox\coder\coder\private\codeProject.p>codeProject/doit at 8    
In C:\Program Files\MATLAB\R2011b\toolbox\coder\coder\private\codeProject.p>codeProject at 13    
In C:\Program Files\MATLAB\R2011b\toolbox\coder\coder\emlcprivate.p>emlcprivate at 18     
The current MEX compiler '`<unknown>`' is not supported.    
Use mex -setup to select a supported compiler.    
Use help codegen for more information on using this command.    

I've run mex -setup several times, chosen Visual Studio (which was what I was using previously and was working fine), and rerun the Build command, but the same error comes up repeatedly. Also, the part "exceeds MATLAB's maximum name length of 63 characters and has been truncated" seems to say Matlab is somehow interpreting the Perl warning as some variable name - I have no idea what's going on there.

I'm not sure why the Perl warning is coming up either - the LC_ALL was previously unset, and now is en_GB, but the same error comes up any way.

Any steps to rectify this would be highly appreciated.

È stato utile?

Soluzione

Ok, after looking carefully at the message, I guessed that Matlab is trying to get the variable name VSINSTALLDIR using Perl internally, and the warning message is throwing it off. I tried running Perl on the command line to confirm the warning appears there too. Then while searching for ways to fix the locale error (Googling gave solutions only for linux and Mac systems), I found a way to simply suppress the Perl warning on this page. After doing that, the above error is gone.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top