目的:在matlab中调用c或c++语言编写的程序

问题错误提示mex.h文件找不到。matlab的版本是2009a,C的版本有6.0跟2010是不是没找到c编译器?在matlab环境下安装C编译器键入mbuild-set... 问题 错误提示 mex.h文件找不到。matlab的版本是2009a, C的版本有6.0跟2010
是不是没找到c编译器?
在matlab环境下安装C编译器键入mbuild -setup选择安装的compiler,
运行结果为:
Please choose your compiler for building standalone MATLAB applications:
Would you like mbuild to locate installed compilers [y]/n? y (此处"y”是我输入的)
Select a compiler:
[0] None
编译器要怎么安装? 或者如果不是编译的问题,如何解决?谢谢
不管怎么整,就是没有编译器呀~~
>> mex -setup
Select a compiler:
[0] None (只有0, 唯一的选择~~)
**************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the new
API. You can find more information about this at:
http://www.mathworks.com/support/solutions/data/1-5C27B9.html?solution=1-5C27B9
Building with the -largeArrayDims option enables the new API.
**************************************************************************

在matlab 的官网(就是问题里面给出的那个链接)上,matlab2011a的documentation 里面讲到compiler的问题说要装vs2010 express 和 sdk , 下载了两个exe ——vc_web, winsdk_web, 安装前面那个的时候运行出来还要再下载vs express, 下载不成功, 所以到现在还是没有弄好~~
展开
 我来答
羽流苏
2011-06-18
知道答主
回答量:2
采纳率:0%
帮助的人:0
展开全部
你有没有先mex -setup? 先这样然后再mbuild -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] Intel C++ 9.1 (with Microsoft Visual C++ 2005 SP1 linker)
[2] Intel Visual Fortran 10.1 (with Microsoft Visual C++ 2005 SP1 linker)
[3] Intel Visual Fortran 9.1 (with Microsoft Visual C++ 2005 SP1 linker)
[4] Lcc-win32 C 2.4.1
[5] Microsoft Visual C++ 6.0
[6] Microsoft Visual C++ .NET 2003
[7] Microsoft Visual C++ 2005 SP1
[8] Microsoft Visual C++ 2008 Express
[9] Microsoft Visual C++ 2008 SP1
[10] Open WATCOM C++

[0] None

Compiler: 9

Your machine has a Microsoft Visual C++ 2008 SP1 compiler located at
e:\Microsoft Visual Studio 9.0. Do you want to use this compiler [y]/n? y

Please verify your choices:

Compiler: Microsoft Visual C++ 2008 SP1
Location: e:\Microsoft Visual Studio 9.0

Are these correct [y]/n? y
***************************************************************************
Warning: MEX-files generated using Microsoft Visual C++ 2008 require
that Microsoft Visual Studio 2008 run-time libraries be
available on the computer they are run on.
If you plan to redistribute your MEX-files to other MATLAB
users, be sure that they have the run-time libraries.
***************************************************************************

Trying to update options file: C:\MathWorks\MATLAB\R2009a\mexopts.bat
From template: E:\SOFTCT~1\MATLAB~2\bin\win32\mexopts\msvc90opts.bat

Done . . .

>> 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] Lcc-win32 C 2.4.1
[2] Microsoft Visual C++ 6.0
[3] Microsoft Visual C++ .NET 2003
[4] Microsoft Visual C++ 2005 SP1
[5] Microsoft Visual C++ 2008 Express
[6] Microsoft Visual C++ 2008 SP1

[0] None

Compiler: 2

The default location for Microsoft Visual C++ compilers is C:\Program Files\Microsoft Visual Studio,
but that directory does not exist on this machine.

Use C:\Program Files\Microsoft Visual Studio anyway [y]/n? y

Please verify your choices:

Compiler: Microsoft Visual C++ 6.0
Location: C:\Program Files\Microsoft Visual Studio

Are these correct [y]/n? y
Warning: MBUILD requires that the Microsoft Visual C++ 6.0
directories "VC98" and "Common" be located within the same parent directory.
(Expected to find these directories in 'C:\Program Files\Microsoft Visual Studio'.)
Trying to update options file:
C:\MathWorks\MATLAB\R2009a\compopts.bat
From template: E:\SOFTCT~1\MATLAB~2\bin\win32\mbuildopts\msvc60compp.bat

Done . . .
追问
谢谢,不过还是只有 [0] none 这个编译器,没有其它选择了。
怎么样才能让它找到一个编译器呢? 我装了c++6.0 跟vs2010 , matlab 居然一个都识别不出来~~
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
手机用户40553
2011-06-17 · TA获得超过143个赞
知道答主
回答量:431
采纳率:0%
帮助的人:248万
展开全部
当然不只是数学运算了,要不那么多病毒木马什么的就都靠边站了;要通过语言实现对操作系统的控制,就要知道系统的API,能过API中的各种接口,达到各种不同的操作;本人也只学了一点C,不太了解.但根据系统的API实现对系统的操作这个是绝对可以了,JAVA都行,更别说C了,WINDOWS就是用C写的
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式