I'm following the Matlab
coder kalman
tutorial in Matlab
help. When using codegen
, there's an error as below:
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
But there is libstdc++.so.6
in /lib/
and /usr/lib
I'm following the Matlab
coder kalman
tutorial in Matlab
help. When using codegen
, there's an error as below:
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
But there is libstdc++.so.6
in /lib/
and /usr/lib
For Fedora 16 use:
sudo yum install libstdc++-static
build-essential
is a Ubuntu package. OP uses Fedora. –
Collyrium sudo dnf install libstdc++-static
saved my life. Thank you. –
Summersummerhouse You can soft link the library to the name that is being sought
ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so
–
Belated If you're compiling a 32-bit application on a 64-bit CentOS 7:
sudo yum install libstdc++-devel.i686
sudo yum install libstdc++-static libstdc++-static.i686
is more appropriate. Tried in my machine and worked. –
Offing i did sudo apt-get install g++-4.7
it work for me for matlab .
For CentOS, be sure you have installed gcc-c++ package (it includes libstdc++-devel dependency):
sudo yum install gcc-c++
© 2022 - 2024 — McMap. All rights reserved.
-m64
compiler flag. – Synectics