BrainVoyager Support

documentation overview

  • Increase font size
  • Default font size
  • Decrease font size

How to get a 64-bit compiler under windows to use with matlab

The following procedure allows for installation of a 64-bit compiler under windows 64-bit systems to use with MatLab .

NOTE: this procedure should also be workable with Microsoft Visual 2010 under newer versions of MatLab
For 2010b and newer please refer to http://www.mathworks.com/support/compilers/R2010b/win64.html
The old method described below still works though


Microsoft Visual C++ Express (free) compiler for MatLab (64-bit)

Download and install Microsoft Visual C++ 2008 Express from http://www.microsoft.com/express/download/
(this will install the 32-bit compiler only in C:\Program Files (x86)\Microsoft Visual Studio 9.0, newer releases also deploy a 64-bit compiler straight away).

Download and install Microsoft Windows SDK for Windows 7 or Windows Server 2008 (in case you are using Win XP 64-bit) dot .NET Framework 3.5 from http://msdn.microsoft.com/en-us/windows/bb980924.aspx (this will install a 64-bit compiler and libraries).

Download Microsoft Visual C++ 2008 Express for MatLab.zip and

Place these three files in C:\Program Files\MATLAB\R2007a\bin\win64\mexopts:
msvc90freeengmatopts.bat
msvc90freematopts.bat
msvc90freematopts.stp

Replace these three files in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin:
vcvars32.bat
vcvars64.bat
vcvarsx86_amd64.bat

Define the environment variables:
SET MSSdk=C:\Program Files\Microsoft SDKs\Windows\v6.1
SET VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools

Start MatLab and type "mex -setup".

Let MatLab find your compiler (it should find C++ Express) and the Windows SDK
(no complaints; tells you to re-distribute run-time libraries).