Skip to content

Instantly share code, notes, and snippets.

@joka90
Created August 25, 2015 10:07
Show Gist options
  • Save joka90/53f4044f8102715ce0c2 to your computer and use it in GitHub Desktop.
Save joka90/53f4044f8102715ce0c2 to your computer and use it in GitHub Desktop.
Changes the Matlab/MEX default compiler to gcc 4.7 for the current user
#replace gcc with gcc 4.7 and g++ with g++-4.7
sed -e s/gcc/gcc-4.7/g /usr/local/MATLAB/R2015a/bin/mexopts.sh | sed s/g\+\+/g\+\+-4.7/g > ~/.matlab/R2015a/mexopts.sh
#start matlab and see if it works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment