|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
我这几天都在编译这个COM组件,可是一直出错,现在用的是VS2005和MATLAB6.5,VS的路径是C:\Program Files\Microsoft Visual Studio 8,MATLAB的路径是C:\MATLAB6p5,我已经一,编译了mbuild -setup,显示:
>> mbuild -setup
Please choose your compiler for building standalone MATLAB applications:
Would you like mbuild to locate installed compilers [y]/n? n
Select a compiler:
[1] Borland C++Builder version 6.0
[2] Borland C++Builder version 5.0
[3] Borland C++Builder version 4.0
[4] Borland C++Builder version 3.0
[5] Borland C/C++ version 5.02
[6] Borland C/C++ version 5.0
[7] Borland C/C++ (free command line tools) version 5.5
[8] Lcc C version 2.4
[9] Microsoft Visual C/C++ version 7.0
[10] Microsoft Visual C/C++ version 6.0
[11] Microsoft Visual C/C++ version 5.0
[0] None
Compiler: 9
The default location for Microsoft Visual C/C++ compilers is C:\Program Files\Microsoft Visual Studio .NET,
but that directory does not exist on this machine.
Use C:\Program Files\Microsoft Visual Studio .NET anyway [y]/n? n
Please enter the location of your compiler: [C:\Program Files\Microsoft Visual Studio .NET] C:\Program Files\Microsoft Visual Studio 8
Please verify your choices:
Compiler: Microsoft Visual C/C++ 7.0
Location: C:\Program Files\Microsoft Visual Studio 8
Are these correct?([y]/n): y
The default options file:
"C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R13\compopts.bat"
is being updated from C:\MATLAB6P5\BIN\WIN32\mbuildopts\msvc70compp.bat...
--> "C:\MATLAB6p5\bin\win32\mwregsvr C:\MATLAB6p5\bin\win32\mwcomutil.dll"
DllRegisterServer in C:\MATLAB6p5\bin\win32\mwcomutil.dll succeeded
--> "C:\MATLAB6p5\bin\win32\mwregsvr C:\MATLAB6p5\bin\win32\mwcommgr.dll"
DllRegisterServer in C:\MATLAB6p5\bin\win32\mwcommgr.dll succeeded
二,编译了mex -setup,显示
>> mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Borland C++Builder version 6.0
[2] Borland C++Builder version 5.0
[3] Borland C++Builder version 4.0
[4] Borland C++Builder version 3.0
[5] Borland C/C++ version 5.02
[6] Borland C/C++ version 5.0
[7] Borland C/C++ (free command line tools) version 5.5
[8] Compaq Visual Fortran version 6.1
[9] Compaq Visual Fortran version 6.6
[10] Digital Visual Fortran version 6.0
[11] Digital Visual Fortran version 5.0
[12] Lcc C version 2.4
[13] Microsoft Visual C/C++ version 7.0
[14] Microsoft Visual C/C++ version 6.0
[15] Microsoft Visual C/C++ version 5.0
[16] WATCOM C/C++ version 11
[17] WATCOM C/C++ version 10.6
[0] None
Compiler: 13
The default location for Microsoft Visual C/C++ compilers is C:\Program Files\Microsoft Visual Studio .NET,
but that directory does not exist on this machine.
Use C:\Program Files\Microsoft Visual Studio .NET anyway [y]/n? n
Please enter the location of your compiler: [C:\Program Files\Microsoft Visual Studio .NET] C:\Program Files\Microsoft Visual Studio 8
Please verify your choices:
Compiler: Microsoft Visual C/C++ 7.0
Location: C:\Program Files\Microsoft Visual Studio 8
Are these correct?([y]/n): y
The default options file:
"C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R13\mexopts.bat"
is being updated from C:\MATLAB6P5\BIN\WIN32\mexopts\msvc70opts.bat...
三,将msvc70engmatopts文件中的
MSVCDir=%MSVCDir%改成MSVCDir=%C:\Program Files\Microsoft Visual Studio 8%,这里不知道改对没有,因为我的C:\Program Files\Microsoft Visual Studio 8路径下还有vc和vc#的文件夹,不知是否还要写再下面的路径。
四,在我的电脑的环境变量path中添加了%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;d:\matlab\bin\win32;c:\matlab6p5\extern\include;c:\matlab6p5\extern\lib\win32\microsoft\msvc70;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;c:\matlab6p5\bin\win32
可是运行comtool时还是显示:
Building standalone executable...
mcc -M -silentsetup -d 'C:/MATLAB6p5/work/comtest/src' -B 'csglcom:comtest,sgltest,1.0' -i C:/MATLAB6p5/work/im_test.m C:/MATLAB6p5/work/split2rgb.m
Could not find the compiler "cl" on the DOS path.
Use mbuild -setup to configure your environment properly.
MBUILD.BAT: Error: Unable to locate compiler.
运行:
optsFile = fullfile(matlabroot,'bin','win32','mexopts','msvc70engmatopts.bat');
compFile = fullfile(matlabroot,'extern','examples','eng_mat','engwindemo.c');
mex(compFile,'-f',optsFile);
就显示:
Could not find the compiler "cl" on the DOS path.
Use mex -setup to configure your environment properly.
C:\MATLAB6P5\BIN\WIN32\MEX.PL: Error: Unable to locate compiler.
??? Error using ==> mex
Unable to complete successfully
现在要疯掉了,不知道怎么弄了,希望各位老师指点迷津!感激不尽! |
|