arm-linux libstdc++ difference in debug and release

175 views Asked by At

I'm going mad about this, so any help is really appreciated.

I have a C++ application compiled for arm-linux. I have two different versions:

  • Debug (compiled with -o0 -g3)
  • Release (compiled with -o3)

Inclusion paths, library paths and libraries are the same for both versions.

When I run the Debug version, it crashes (and I'm investigating why).

When I run the Release version, i obtain this error:

../Appl_arm-linux_Release: /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.20 not found (required by ../Appl_arm-linux_Release)

I don't understand why the Debug version can work on a system where the Release version can't even load.

1

There are 1 answers

0
bjornruffians On

You could try the -static-libstdc++ linker option to statically link libstdc++. From info here, it looks like you can still dynamically link other libs.