I have the following MATLAB file:
function area = circleArea(rad1)area = pi*rad1*rad1;
I am using a supported Microsoft Visual C++ compiler and compile the MATLAB code into a C shared library as follows:
mcc -W lib:circlelib -T link:lib circleArea -v
However I receive the following errors:
circlelib.c(113) : error C2143: syntax error : missing ')' before 'constant' circlelib.c(113) : error C2143: syntax error : missing '{' before 'constant' circlelib.c(113) : error C2059: syntax error : '<Unknown>' circlelib.c(113) : error C2059: syntax error : ')' D:\APPLICATIONS\MATLAB\R2006A\BIN\MEX.PL: Error: Compile of 'circlelib.c' failed. Error: An error occurred while shelling out to mbuild (error code = 1). Unable to build executable. ??? Error executing mcc, return status = 1.
This error is only generated when using a Microsoft Visual C++ compiler; the library does successfully compile when using the LCC compiler.
Best Answer