Mex error. Collect2 -lstdc++
1 回表示 (過去 30 日間)
古いコメントを表示
Hey. I'm trying to compile a mex function, and I'm having a little trouble. Any help would be appreciated.
The command is
mex('-DDEFINEUNIX','-largeArrayDims','mtimesx.c','/usr/lib64/libblas.so.3.2.1')
and the error I'm getting is:
Warning: You are using gcc version "4.4.0". The version
currently supported with MEX is "4.3.4".
For a list of currently supported compilers see:
http://www.mathworks.com/support/compilers/current_release/
mtimesx.c: In function ‘mexFunction’:
mtimesx.c:592: warning: assignment discards qualifiers from pointer target type
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
mex: link of ' "mtimesx.mexa64"' failed.exa64"' failed.
Any thoughts on what might be going wrong?
0 件のコメント
回答 (1 件)
Ken Atwell
2012 年 4 月 3 日
What Linux distro are you running? I'll ignore the warns and address the link error:
It looks like the g++ libraries are not installed on your system, and MATLAB needs to them to link. Yes, you are "only" using C and not C++, but the MATLAB libraries you link against require C++ libraries.
In short, you'll want to install the "gcc-g++" package, or something with a similar name, depending on the distribution you are using.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!