How to prompt Matlab to use VS10 64 bit compiler

4 visualizaciones (últimos 30 días)
Donald Hume
Donald Hume el 8 de Feb. de 2013
Hello all. 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 compile 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, and have read countless MATLAB Central articles.
Thanks so much in advance!
Don
  3 comentarios
Donald Hume
Donald Hume el 11 de Feb. de 2013
I have done both of these
Kaustubha Govind
Kaustubha Govind el 14 de Feb. de 2013
Donald: Could you please the exact compiler error message that you see?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by