[SOLVED] Problem creating mex files in Matlab 7.8.0

Issues related to software problems.

[SOLVED] Problem creating mex files in Matlab 7.8.0

Postby mebden » 2011/09/02 07:29:36

Hi,

Running Matlab 7.8.0 on CentOS 5.5, I'd like to start mexing .c files. My gcc works fine (version 4.1.2 20080704). I followed the standard instructions:
www.mathworks.co.uk/support/tech-notes/ ... l#example1

But I get an error at the Matlab prompt, which may or may not indicate that Matlab is having trouble finding the C compiler:

-------------------------------------------------
>> mex hello.c
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status

mex: link of ' "hello.mexglx"' failed.

??? Error using ==> mex at 218
Unable to complete successfully.
-------------------------------------------------

I'm relatively bad with Linux commands, but hopefully there is something that could fix this in one or two specific lines at the CentOS prompt? Thanks for your help.

Cheers,

Mark
mebden
 
Posts: 2
Joined: 2011/09/02 07:18:31

Re: Problem creating mex files in Matlab 7.8.0

Postby TrevorH » 2011/09/02 09:44:11

Do you have the package libstdc++-devel installed?
User avatar
TrevorH
Forum Moderator
 
Posts: 13486
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem creating mex files in Matlab 7.8.0

Postby mebden » 2011/09/02 15:19:54

Hi,

Thanks, I don't know if it was there already but I typed 'yum install libstdc++-devel'. Now it works! Thanks.

Cheers,

Mark
mebden
 
Posts: 2
Joined: 2011/09/02 07:18:31

[SOLVED] Problem creating mex files in Matlab 7.8.0

Postby pschaff » 2011/09/17 13:51:37

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

Thanks for reporting back. Marking this thread [SOLVED] for posterity.
pschaff
Retired Moderator
 
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America


Return to CentOS 5 - Software Support

Who is online

Users browsing this forum: No registered users and 3 guests