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:
http://www.mathworks.co.uk/support/tech-notes/1600/1605.html#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
[SOLVED] Problem creating mex files in Matlab 7.8.0
Re: Problem creating mex files in Matlab 7.8.0
Do you have the package libstdc++-devel installed?
Re: Problem creating mex files in Matlab 7.8.0
Hi,
Thanks, I don't know if it was there already but I typed 'yum install libstdc++-devel'. Now it works! Thanks.
Cheers,
Mark
Thanks, I don't know if it was there already but I typed 'yum install libstdc++-devel'. Now it works! Thanks.
Cheers,
Mark
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
[SOLVED] Problem creating mex files in Matlab 7.8.0
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.
Thanks for reporting back. Marking this thread [SOLVED] for posterity.