Skip to content

TroubleshootInstall

adonze edited this page Mar 7, 2018 · 1 revision

Troubleshooting Install

Most installation issues come from getting a proper mex compilation setup to work. The way to go should be to install the latest Visual C++ compiler, but Matlab has a conflicted relationship with C/C++ compilers under Windows, so that depending on the versions of Windows/Matlab and potentially your hardware, things can behave differently. Here, we try to list different configurations where setup was not straightforward.

Please contribute your own horror story (if possible with happy ending) about installing a mex compiler for your version of Windows and Matlab, for example by submitting an issue.

Install on Matlab 2015a and Windows 10

Mathworks supports Windows 10 since R2015b. Hence, to set up a compatible C++ compiler with R2015a is a bit of a pain, also because of a buggy conflict between Win10 and Windows SDK 7.1, which Matlab insists it wants you to install. As of Nov. 2016, a work around consists in:

  1. Installing Windows SDK 7.1 - somehow it will complain about .NET framework not being installed and will refuse to install any C++ compiler
  2. Installing “Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1” .
  3. Supposedly, it should work, however, at compile time mex might complain about a missing header file: ammintrin.h. Copy that into

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Include\

The header file can be found at this answer on Matlab Central.

On a less critical note, if you have a high resolution screen that requires font scaling, note that R2015a handles HiDPI quite poorly due to a bug. A fix for this can be found here.

Using MinGW-w64

Since I’m not sure when, Mathworks started supporting MinGW-w64 compiler, which is basically gcc/g++ for Windows. Breach v1.2.15 and before does not support yet Windows+MinGW-w64 and compilation will fail for some functions. However, the mex functions that do not compile are either legacy functions not used anymore or relatively new experimental features not really mature (STL online monitoring), so that a current workaround consists in skipping their compilation and most functionalities will work. To do this, add comments on lines 147 and 164, to skip execution of CompileBlitzLib and compile_stl_mex, and about everything should (hopefully) be fine.

Clone this wiki locally