2
votes

I am currently following SIFTGPU matlab tutorial, and is stuck at this very early section:

SIFTGPU is coded in C++ and must be saved as a .mex (matlab external) file before it can be called from Matlab. In order to create the .mex file, you must make sure that Matlab is set up to access an external C++ compiler by entering

mex –setup

into the Matlab command window and following the on-screen instructions.

Because I didn't have Visual C++ express 2010 and Windows SDK, I followed the instruction at http://www.mathworks.com/support/compilers/R2011a/win64.html

The installation of both software are fine, however, when it comes to matlab:

>> mex -setup

Welcome to mex -setup.  This utility will help you set up  
a default compiler.  For a list of supported compilers, see  
http://www.mathworks.com/support/compilers/R2011a/win64.html 

Please choose your compiler for building MEX-files: 

Would you like mex to locate installed compilers [y]/n? y

Select a compiler: 
[1] Microsoft Visual C++ 2010 Express in D:\VS2010 

[0] None 

Compiler: 1

Please verify your choices: 

Compiler: Microsoft Visual C++ 2010 Express  
Location: D:\VS2010 

Are these correct [y]/n? y

***************************************************************************** 
  Error: Microsoft Visual C++ 2010 Express requires the Microsoft Windows 
         Software Development Kit (SDK), but the SDK cannot be found.  
         For more information about the required SDK, see:  
         http://www.mathworks.com/support/compilers/R2011a/win64.html 
***************************************************************************** 

??? Error using ==> mex at 208
Unable to complete successfully.

I am not sure where to go next. Could somebody tell me what do I need to do next after installing VC++ Express 2010 and Windows SDK?

1

1 Answers

1
votes

Do not install Visual Studio Express. Install the Windows SDK - it comes with a compiler, and that setup works with MATLAB. Visual Studio did not work for me either because of some problems with batch files you need to run to setup the environment.

Edit This is the mex configuration screen after you install the SDK:

mex -setup

Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2012a/win64.html

Please choose your compiler for building MEX-files:

Would you like mex to locate installed compilers [y]/n? y

Select a compiler:

[1] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0

[0] None

Compiler: