I am trying to set mex to use gcc4.4 (my system default is 4.6, but I also have installed the 4.4 package). I read that 'mex -setup' is supposed to give you a list of available compilers. (from mex -help - "The -setup option causes MEX to search for installed compilers and allows you to choose an options file as the default for future invocations of MEX."). However, when I run 'mex -setup', I only see the option to copy the original mexopts.sh file:
doriad@david-lab:~/.matlab/R2011b$ ~/bin/matlab/bin/mex -setup
Options files control which compiler to use, the compiler and link command
options, and the runtime libraries to link against.
Using the 'mex -setup' command selects an options file that is
placed in /home/doriad/.matlab/R2011b and used by default for 'mex'. An options
file in the current working directory or specified on the command line
overrides the default options file in /home/doriad/.matlab/R2011b.
To override the default options file, use the 'mex -f' command
(see 'mex -help' for more information).
The options files available for mex are:
1: /home/doriad/bin/matlab/bin/mexopts.sh :
Template Options file for building gcc MEX-files
0: Exit with no changes
Enter the number of the compiler (0-1):
Can anyone tell me how to get it to find my different gcc compilers and ask me which one to use?