Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: compiling .cpp file failed
Replies: 1   Last Post: Dec 12, 2012 9:26 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,944
Registered: 12/7/04
Re: compiling .cpp file failed
Posted: Dec 12, 2012 9:26 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"Hana " <hanafedora@imperial.co.uk> wrote in message
news:ka9hr5$6q3$1@newscl01ah.mathworks.com...
> Hello,
>
> 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/MATLAB_R2012b.app/bin/mexopts.sh : Template Options file
> for building gcc MEX-files
> 0: Exit with no changes
>
> Enter the number of the compiler (0-1):
> 1
>
> Overwrite /Users/username/.matlab/R2012b/mexopts.sh ([y]/n)? y
>
> /Applications/MATLAB_R2012b.app/bin/mexopts.sh is being copied to
> /Users/username/.matlab/R2012b/mexopts.sh
>
> mex rir_generator.cpp
>
> /Applications/MATLAB_R2012b.app/bin/mex: line 305: gcc-4.2: command not
> found
> /Applications/MATLAB_R2012b.app/bin/mex: line 1326: g++-4.2: command not
> found


Searching the support website for "gcc-4.2" found these two hits that seem
relevant:

http://www.mathworks.com/matlabcentral/answers/18593-gcc-4-2-not-found

http://www.mathworks.com/support/solutions/en/data/1-FR6LXJ/index.html?solution=1-FR6LXJ

Try the steps they suggest and if it doesn't work either post back in this
thread or contact Technical Support.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.