mex -setup doesn't seem to find my compilers?

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?
Thanks,
David

Antworten (1)

Fangjun Jiang
Fangjun Jiang am 9 Dez. 2011

1 Stimme

What is the version of your MATLAB and what is your operating system. If you search your document (doc mex), you'll be able to find a link that tells you what compilers are supported. Or you can try this link to see if you can find the one corresponding to your version and OS.

4 Kommentare

David Doria
David Doria am 9 Dez. 2011
I know which version I need to use - what I am asking is how to set it. I thought mex -setup was supposed to give me a list of available compilers?
Fangjun Jiang
Fangjun Jiang am 9 Dez. 2011
That is my point. Can you check if gcc4.4 or gcc4.6 is supported for your MATLAB version and OS?
David Doria
David Doria am 9 Dez. 2011
It is not, I am supposed to use 4.3. However, if I specify gcc-4.4 manually in my mexopts.sh, it works. Are you saying that mex -setup will only find compilers that are actually supported?
David: Yes, mex -setup will only find supported compilers.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB Compiler finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 9 Dez. 2011

Community Treasure Hunt

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

Start Hunting!

Translated by