usr/bin/ld: cannot find -l:/usr/lib/libstdc++.so.6

General support questions
Post Reply
CMiko
Posts: 1
Joined: 2017/02/18 22:21:00

usr/bin/ld: cannot find -l:/usr/lib/libstdc++.so.6

Post by CMiko » 2017/02/18 22:35:12

Hi,
I've tried to compile a program and received the following error:
/usr/bin/ld: cannot find -l:/usr/lib/libstdc++.so.6
but when I type:
$ locate libstdc++.so.6
/usr/lib/libstdc++.so.6
/usr/lib/libstdc++.so.6.0.19
/usr/lib64/libstdc++.so.6
/usr/lib64/libstdc++.so.6.0.19
/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.19-gdb.py
/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.19-gdb.pyc
/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.19-gdb.pyo
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.py
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyc
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyo
it is a 32bit program and I'm working on a 64bit CentOS 7 but installed libstdc++.i686 and libstdc++-devel.i686
I've tried creating symbolic links and tried updating LD_PATH with no luck.
Thank you

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: usr/bin/ld: cannot find -l:/usr/lib/libstdc++.so.6

Post by TrevorH » 2017/02/19 03:00:44

/usr/bin/ld: cannot find -l:/usr/lib/libstdc++.so.6
That doesn't look right. Whenever I've seen messages like that they say e.g. cannot find -lnetsnmp and that means it's looking for libnetsnmp.so. Yours has the full path in there so I'd check your makefile is correct.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply