- 积分
- 0
- 注册时间
- 2008-11-9
- 仿真币
-
- 最后登录
- 1970-1-1
|
用的matlab6.5.
我现在想在vc中调用m文件中的函数,因此想将m文件生成dll,为了充分说明问题,我把前面编译器配置过程也说一下。
mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? n
.....
mbuild -setup
Please choose your compiler for building standalone MATLAB applications:
Would you like mbuild to locate installed compilers [y]/n? n
....
两个命令后面都出现了类似的警告,如下:
Warning: Mbuild requires that the Microsoft Visual C++ 6.0
directories "VC98" and "Common" be located within the same parent directory.
(Expected to find a directory named "Common" in the directory 'e:\program files'.)
The default options file:
"C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R13\compopts.bat"
is being updated from E:\MATLAB6P5\BIN\WIN32\mbuildopts\msvc60compp.bat...
--> "E:\MATLAB6p5\bin\win32\mwregsvr E:\MATLAB6p5\bin\win32\mwcomutil.dll"
DllRegisterServer in E:\MATLAB6p5\bin\win32\mwcomutil.dll succeeded
--> "E:\MATLAB6p5\bin\win32\mwregsvr E:\MATLAB6p5\bin\win32\mwcommgr.dll"
DllRegisterServer in E:\MATLAB6p5\bin\win32\mwcommgr.dll succeeded
Installing the MATLAB Visual Studio add-in ...
Warning: Could not update e:\program files\common\msdev98\template\MATLABWizard.awx
from E:\MATLAB6P5\BIN\WIN32\MATLABWizard.awx
Warning: Could not update e:\program files\common\msdev98\template\MATLABWizard.hlp
from E:\MATLAB6P5\BIN\WIN32\MATLABWizard.hlp
Warning: Could not update e:\program files\common\msdev98\addins\MATLABAddin.dll
from E:\MATLAB6P5\BIN\WIN32\MATLABAddin.dll
Warning: Could not update e:\program files\common\msdev98\bin\usertype.dat
from E:\MATLAB6P5\BIN\WIN32\usertype.dat
上面我选择的是vc6.0.
我没有理会,然后我用 mcc -t -h -L C -W lib:ppp -T link:lib myfunct.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.
??? Error using ==> mbuild
Unable to complete successfully
??? Error: An error occurred while shelling out to mbuild (error code = 1).
Unable to build executable (specify the -v option for more information).
Error in ==> E:\MATLAB6p5\toolbox\compiler\mcc.dll
请问这是怎么回事呢?请指点一下!(但却生成了.h 和.c文件)
焦急等待中! |
|