Why is 'mex -setup' unable to locate the Microsoft Platform SDK?

9 visualizaciones (últimos 30 días)
I have downloaded and installed the Microsoft Platform SDK (<http://www.microsoft.com/en-sg/download/details.aspx?id=15656>) on 64-bit Windows. However, when I run the command:
mex -setup
to select a compiler, MATLAB does not list this compiler as an option.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 18 de Oct. de 2013
The MSSdk variable needs to be defined in the Windows environment when using Microsoft Platform SDK with MATLAB® 7.2 (R2006a) to 7.7 (R2008b) and related products. The value of this environment variable is the path to the installation directory for Microsoft Platform SDK.
Running the Microsoft Platform SDK installer does not auto-set the required environment variable MSSdk.
Follow the steps listed below to setup the MSSdk environment variable after you have installed Microsoft Platform SDK.
1. Go to Control Panel -> System -> "Advanced" -> "Environment variables".
2. Create a new system variable with the name "MSSdk".
3. The value of this variable should be the path where the Microsoft Platform SDK is installed.
4. Click OK a few times to close out the Control Panel window, and all its children.
5. Restart MATLAB.
MEX -setup should now be able to locate the Microsoft Platform SDK to be used with MATLAB.
Alternatively, if MSSdk is not set, the command 'mex -setup' searches the system path for the name ''C:\Program Files\Microsoft Platform SDK" in order to locate it. If you installed the SDK in a directory with a different name, for example "C:\Program Files\Microsoft Platform SDK1", MEX will not be able to locate it.
To work around this issue without setting MSSdk, specify a compiler and its location manually, as follows:
1. Execute the command:
mex -setup
at the MATLAB command prompt.
2. Enter 'n' when asked if you would like mex to locate installed compiler. This will present you with a list of all the supported compilers for the current release of MATLAB.
3. Enter the number corresponding to the compiler that you want to use (In this case, Microsoft Platform SDK).
4. You will be presented with the default directory for the compiler. If this is not the installation directory of your compiler, select 'n' to prevent the MEX script from selecting that directory.
5.When prompted to enter the location of your compiler, enter the absolute path to the directory where the compiler has been installed.
  6 comentarios
Walter Roberson
Walter Roberson el 31 de En. de 2017
Rahimah binti Abdul Hamid, was it SDK 7.1 that you installed, or was it SDK 8 ?
Walter Roberson
Walter Roberson el 31 de En. de 2017
SDK 8 is not supported by mex -setup in R2016a. SDK 7.1 is supported, if your operating system supports that.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Troubleshooting in MATLAB Compiler SDK en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2006b

Community Treasure Hunt

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

Start Hunting!

Translated by