Info

This question is closed. Reopen it to edit or answer.

Multiple Matlab installations with diferent mex compiler?

1 view (last 30 days)
If I have many different Matlab installations (both 32-bit and 64 bit) I need also different mex compiler but it seeems that the installations uses the same directory to store this information (c:\matlab_prefdir) so the latest setting is used on all installations. How can i change this to use different folders for different Matlab versions?

Answers (2)

Titus Edelhofer
Titus Edelhofer on 10 Feb 2015
Hi Jonas,
multiple MATLAB installations do not share the same preferences, but 32/64 bit, that's right. One simple strategy is to add a file startup.m to matlab\toolbox\local (or some other folder, that you use as startup folder in Windows), and put a line similar to
mex -setup:C:\MATLAB\R2014b\bin\win64\mexopts\msvc2012.xml
into it. This way you do the mex setup each time you start a MATLAB version.
Titus

Jonas
Jonas on 10 Feb 2015
Edited: Jonas on 10 Feb 2015
Hmmm, I have 2012b 64-bit and 2013b 32-bit installed and they both point to c:\matlab_prefdir
I note that I have an environment variable MATLAB_PREFDIR set to this folder. I will try to remove this and see I get different folders!
  1 Comment
Titus Edelhofer
Titus Edelhofer on 10 Feb 2015
Edited: Titus Edelhofer on 10 Feb 2015
That could be the reason. Usually it's on Windows something like
C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2014b
Titus

This question is closed.

Products

Community Treasure Hunt

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

Start Hunting!