title: Switch compiler on Matlab 2017a in Ubuntu OS
body: <p>I am running a script that needs a cpp compiler. I'm using MATLAB on both Windows and Ubuntu. On windows, with:</p>
  
  <pre><code>MEX configured to use 'MinGW64 Compiler (C++)' for C++ language compilation.
  </code></pre>
  
  <p>i have no problem.</p>
  
  <p>On Ubuntu, i have:</p>
  
  <pre><code>MEX configured to use 'g++' for C++ language compilation.
  </code></pre>
  
  <p>and when i try to compile me .cpp files i get this error:</p>
  
  <pre><code>Error using mex
  /home/christosandsoren/17gr10409/deformable_models/texture_functions/build_km_tree.cpp: In function ‘void mexFunction(int, mxArray**, int, const mxArray**)’:
  /home/christosandsoren/17gr10409/deformable_models/texture_functions/build_km_tree.cpp:380:9: error: cannot convert ‘const size_t* {aka const long unsigned int*}’ to ‘const
  int*’ in assignment
       dim = mxGetDimensions(prhs[0]);
           ^
  /home/christosandsoren/17gr10409/deformable_models/texture_functions/build_km_tree.cpp:402:68: error: cannot convert ‘int*’ to ‘const size_t* {aka const long unsigned
  int*}’ for argument ‘2’ to ‘mxArray* mxCreateNumericArray(size_t, const size_t*, mxClassID, mxComplexity)’
       plhs[0] = mxCreateNumericArray(2, dtree, mxDOUBLE_CLASS, mxREAL);
                                                                      ^
  
  
  Error in compile_mex_functions (line 3)
  mex build_km_tree.cpp % based on Euclidean distance
  </code></pre>
  
  <p>I installed mingw-w64, by <code>sudo apt-get install mingw-w64</code> but i still get the same result.</p>