MATLAB: Do I receive the error ‘same file names packaged together in flat hierarchy’ when I build a model in R2016b

simulink coder

Why do I receive the error 'same file names packaged together in flat hierarchy' when I build a model in R2016b?

Best Answer

In R2016b, the error appears if the current directory drive is not mentioned in capital letters. For example, 'd:\' instead of 'D:\'.
You can verify that the current directory drive appears in capital letters. For example, let us consider that the current working directory is mapped to 'H:\Example'. Prior to building the model, execute the following command in the MATLAB command window:
>> pwd
The above command identifies the current folder. If the value returned by 'pwd' is 'h:\Example', you will encounter an error. To resolve the issue, modify the current working directory to 'H:\Example'. 
Please note that the error appears only in R2016b.