3

I'm new to compiling libraries .so under Ubuntu. I have the source, .cpp file. I installed the build-essentials package finely, and I'm using the Anjuta IDE to compile the source code. I have the Makefile and everything is good.

Now although it compiles without error, when I load it, I get the error:

/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found`

What does this mean and how can I fix it?

Edit: Any more tips?

Edit2: I really need help guys.

user1667191
  • 2,387
  • 6
  • 20
  • 25
  • Have you installed the `libstdc++6` package? That might fix it. – Miguel Sep 16 '12 at 03:11
  • Yes I have it installed. I'm now running the command Gung Foo posted. Will update later if it fixes or not. – user1667191 Sep 16 '12 at 03:31
  • Possible duplicate of [/usr/lib/libstdc++.so.6: version \`GLIBCXX\_3.4.15' not found](http://stackoverflow.com/questions/5216399/usr-lib-libstdc-so-6-version-glibcxx-3-4-15-not-found) – Martin G Jul 11 '16 at 09:20

3 Answers3

2

I had similar issues and I tried (https://askubuntu.com/questions/164296/glibcxx-3-4-15-not-found):

sudo apt-get install libstdc++6

optionally you can force a global update of all the linked libraries with

sudo ldconfig

this last command can take some time and will not print anything on the bash, just wait.

Community
  • 1
  • 1
Skandh
  • 426
  • 3
  • 18
  • Here's what I get when I do that: `Reading package lists... Done Building dependency tree Reading state information... Done libstdc++6 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.` – user1667191 Sep 16 '12 at 09:59
1

Sounds like a dependency problem, is your system up to date?

apt-get install && apt-get upgrade
Gung Foo
  • 13,392
  • 5
  • 31
  • 39
1

One way to work around this issue is to simply link libstdc++ statically (with this parameter sent to g++ when linking the executable):

-static-libstdc++

If linking in the library statically is an option this is probably the quickest work-around.

Martin G
  • 17,357
  • 9
  • 82
  • 98