I have some working Matlab code, which I try to transform into C code using the Matlab coder. I am getting this error:
18 c:\users\bla\project\strcmpi.h(79) : warning C4028: formal parameter 2 different from declaration
19 c:\users\bla\project\strcmpi.h(79) : error C2371: 'strcmpi' : redefinition; different basic types
20 c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(245) : see declaration of 'strcmpi'
21 NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
22 Stop.
23 The make command returned an error of 2
24 'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
25 operable program or batch file.
It looks very C specific to me (I am not a proficient C programmer). Can anyone please point me in the right direction to overcome this error? Thanks.
PS:
Here is some adapted Matlab code:
if(strcmpi(parameters.x,'bladibla') == 1)
% some code
else
% some more code
end
where 'parameters' is a struct. I would like to stick to my struct but if there are better ways to achieve the above, especially in the context of the Matlab coder and C, please let me know.