I have C function that call other functions from multiple C files therefore i have some H files. I setup my compiler: Microsoft Software Development Kit (SDK) 7.1. I create my MEX source file, so how it is described in help. I try to build mex function by typing this:
mex 'codegen\lib\quadraticSolver\quadraticSolver.c' ... 'codegen\lib\quadraticSolver\quadraticSolver_initialize.c' ... 'codegen\lib\quadraticSolver\quadraticSolver_terminate.c' ... 'codegen\lib\quadraticSolver\rt_nonfinite.c' ... 'codegen\lib\quadraticSolver\rtGetNaN.c' ... 'codegen\lib\quadraticSolver\rtGetInf.c' ... 'codegen\lib\quadraticSolver\quadraticSolver.h' ... 'codegen\lib\quadraticSolver\quadraticSolver_initialize.h' ... 'codegen\lib\quadraticSolver\quadraticSolver_terminate.h' ... 'codegen\lib\quadraticSolver\rt_nonfinite.h' ... 'codegen\lib\quadraticSolver\rtGetNaN.h' ... 'codegen\lib\quadraticSolver\rtGetInf.h' ... 'codegen\lib\quadraticSolver\rtwtypes.h' ... 'codegen\lib\quadraticSolver\quadraticSolver_types.h';
And this error popped up:
codegen\lib\quadraticSolver\quadraticSolver.h : fatal error LNK1107: invalid or corrupt file: cannot read at 0x23D
C:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'quadraticSolver.mexw64' failed.
Error using mex (line 206) Unable to complete successfully.
Error in mex_maker (line 1) mex 'codegen\lib\quadraticSolver\quadraticSolver.c' …
Why?
Best Answer