Date: Dec 12, 2012 9:51 AM
Author: Hana
Subject: compiling .cpp file failed


I used to use MATLAB R2008b to do my work and now I've just installed MATLAB R2012b in my new computer. I have a file name rir_generator.cpp that I want to use in MATLAB. So I've tried setting it up as below, and this is what I got. I'm not really an expert on this and I don't know why it's failed. Can someone please help??

mex -setup

The options files available for mex are:

1: /Applications/ :
Template Options file for building gcc MEX-files
0: Exit with no changes

Enter the number of the compiler (0-1):

Overwrite /Users/username/.matlab/R2012b/ ([y]/n)?

/Applications/ is being copied to

mex rir_generator.cpp

/Applications/ line 305: gcc-4.2: command not found
/Applications/ line 1326: g++-4.2: command not found

mex: compile of ' "rir_generator.cpp"' failed.

Error using mex (line 206)
Unable to complete successfully.