我正在尝试使用Visual Studio 2010 Professional编译器在MATLAB中编译和运行64位应用程序。我知道程序和编译器都能正常工作,因为当我从Visual Studio x64命令提示符启动matlab时,我能够毫无问题地运行程序。
我已经运行mex -setup并选择了2010编译器,如下所示:
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] Microsoft Visual C++ 2010 in C:\Program Files (x86)\Microsoft Visual Studio 10.0
[2] Microsoft Visual C++ 2008 Express in C:\Program Files (x86)\Microsoft Visual Studio 9.0
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Visual C++ 2010 Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0
Are these correct [y]/n? y
************************************************************************* Warning: MEX-files generated using Microsoft Visual C++ 2010 require that Microsoft Visual Studio 2010 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:\Users\OEM\AppData\Roaming\MathWorks\MATLAB\R2010a\mexopts.bat From template: C:\PROGRA~1\MATLAB\R2010a\bin\win64\mexopts\msvc100opts.bat
Done . . .
不幸的是,这似乎不允许我运行64位应用程序。我得到关于cl预处理器命令的错误,必须指出我没有使用64位编译器的事实。有谁知道我如何配置这个,以便我不需要从Visual Studio 2010命令行运行Matlab?我很感激任何帮助。
提前非常感谢!
唐