用的是VC++6.0,matlab7.8也就是matlabR2009
首先在matlab下設置環境
>> mbuild -setup
Please choose your compiler for building standalone MATLAB applications:
Would you like mbuild to locate installed compilers [y]/n? y
Select a compiler:
[1] Lcc-win32 C 2.4.1 in F:\MATLAB\R2009a\sys\lcc
[2] Microsoft Visual C++ 6.0 in F:\VC++6.0
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C++ 6.0
Location: F:\VC++6.0
Are these correct [y]/n? y
Done . . .
>> 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-win32 C 2.4.1 in F:\MATLAB\R2009a\sys\lcc
[2] Microsoft Visual C++ 6.0 in F:\VC++6.0