How to prompt Matlab to use VS10 64 bit compiler

£可爱£侵袭症+ 提交于 2020-01-24 20:43:25

问题


I am trying to compile and run a 64bit application in MATLAB using the Visual Studio 2010 Professional compiler. I know both the program and the compiler work properly because when I start matlab from the Visual Studio x64 command prompt I am able to run the program without an issue.

I have run mex -setup and selected the 2010 compiler as follows:

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 . . .

Unfortunately this doesn't seem to allow me to run the 64bit application. I get an error regarding cl preprocessor commands, essential pointing to the fact I'm not using a 64 bit compiler. Does anyone know how I can configure this so that I will not need to run Matlab from the Visual Studio 2010 command line? I would appreciate any help on this.

Thanks so much in advance!

Don

来源:https://stackoverflow.com/questions/14816301/how-to-prompt-matlab-to-use-vs10-64-bit-compiler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!