>> mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[1] Lcc C version 2.4.1 in D:\MATLAB71\sys\lcc
[2] Microsoft Visual C/C++ version 6.0 in D:\Microsoft Visual Studio
[0] None
Compiler: 1
Please verify your choices:
Compiler: Lcc C 2.4.1
Location: D:\MATLAB71\sys\lcc
Are these correct?([y]/n): y
Try to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R14SP3\mexopts.bat
From template: D:\MATLAB71\BIN\win32\mexopts\lccopts.bat
Done . . .
***************************************************************************
Warning: The file extension of 32-bit Windows MEX-files was changed
from ".dll" to ".mexw32" in MATLAB 7.1 (R14SP3). The generated
MEX-file will not be found by MATLAB versions prior to 7.1.
Use the -output option with the ".dll" file extension to
generate a MEX-file that can be called in previous versions.
For more information see:
MATLAB 7.1 Release Notes, New File Extension for MEX-Files on Windows
***************************************************************************
>> cd d:/MATLAB71/work/SBA
>> mex sba.c
lcc preprocessor error: sba.c:29 Could not find include file <sba.h>
Error sba.c: 718 undeclared identifier `SBA_OPTSSZ'
Error sba.c: 718 integer expression must be constant
Error sba.c: 718 undeclared identifier `SBA_INIT_MU'
Error sba.c: 718 initializer must be constant
Error sba.c: 718 undeclared identifier `SBA_STOP_THRESH'
Error sba.c: 718 initializer must be constant
Error sba.c: 718 initializer must be constant
Error sba.c: 718 initializer must be constant
Error sba.c: 718 too many initializers
Error sba.c: 719 undeclared identifier `SBA_INFOSZ'
Error sba.c: 719 integer expression must be constant
Error sba.c: 1051 undeclared identifier `SBA_ERROR'
Warning sba.c: 1051 possible usage of SBA_ERROR before definition
Warning sba.c: 1093 indexing array info[5] out of bounds (1)
Warning sba.c: 1093 indexing array info[6] out of bounds (1)
Warning sba.c: 1093 indexing array info[1] out of bounds (1)
Warning sba.c: 1093 indexing array info[7] out of bounds (1)
Warning sba.c: 1093 indexing array info[8] out of bounds (1)
Warning sba.c: 1093 indexing array info[9] out of bounds (1)
Warning sba.c: 719 possible usage of SBA_INFOSZ before definition
Warning sba.c: 718 possible usage of SBA_STOP_THRESH before definition
Warning sba.c: 718 possible usage of SBA_INIT_MU before definition
Warning sba.c: 718 possible usage of SBA_OPTSSZ before definition
13 errors, 11 warnings
D:\MATLAB71\BIN\MEX.PL: Error: Compile of 'sba.c' failed.
??? Error using ==> mex
Unable to complete successfully
>>
我明明将sba.h放到了工作目录下,为何还是提示error: sba.c:29 Could not find include file <sba.h> ??我该怎么处理这种C文件里面包含其他.h文件的文件,才能将其成功转换出.mexw32文件来??