title: Cannot run Matlab Mex files on Mac OS X Lion 10.7.5 with Xcode Version 4.3.2
body: <p>When I am trying to run c++ codes on matlab, I use the following commands:</p>
  
  <p>mex '-setup'
  (Then I select the following two options which are:
    1: /Applications/MATLAB_R2011a_Student.app/bin/gccopts.sh : 
        Template Options file for building gcc MEX-files</p>
  
  <p>and
    2: /Applications/MATLAB_R2011a_Student.app/bin/mexopts.sh : 
        Template Options file for building MEX-files via the system ANSI compiler</p>
  
  <p>When I select either one and select a mex file by writing the following:mex mextest1p0.cpp, I get these error messages:</p>
  
  <p>/Applications/MATLAB_R2011a_Student.app/bin/mex: line 1041: g++-4.2: command not found</p>
  
  <p>How can I fix this. Note: I have seen a couple post about this problem and I've tried various solutions, but nothing is working</p>