libstdc++ GLIBCXX version errors
It seems you are using the standard library as a shared library (default behaviour) when linking your program at home.
So rather than really "linking" the library, your linker just resolves some symbols and does another operation, while delaying the actual loading of the library to run-time.
When you execute your program at your university computer, the loader (the program which actually loads your program in memory and throws the main thread) looks for the libraries your program needs and tries to load them (look for LD_LIBRARY_PATH
in linux if you feel curious).
The problem here is that you are linking your program at home with a version of the stdlib that is not the same version as what you have at the university. So when the loader tries to find the library, it fails, and so your program cannot be run.
Solutions:
a) To avoid all these problems use static linking instead of dynamic linking. I am not sure if this is possible with stdlib, but I think it is worth to test it (see: http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html and look for "-static" flag)
b) You can try to compile your program at your university computer so it will use the version there.
c) Try to know which stdlib version is installed there and install the same version in your compiler machine.
d) You can try to copy your home version of stdlib to the same folder your application is. This usually works because the loader tends to search for shared libraries in the current application folder before looking in the path set in the environment variable LD_LIBRARY_PATH
(linux)
Hope that helps.
P.S.:
Here you have a nice introduction to static vs shared/dynamic libraries http://www.network-theory.co.uk/docs/gccintro/gccintro_25.html
And here (http://en.wikipedia.org/wiki/Library_%28computing%29) a not so nice but more complete library description.
/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found
I'm compiling gcc 4.6 from source, and apparently
sudo make install
didn't catch this one. I dug around and found
gcc/trunk/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.15
I copied it in to /usr/lib and redirected libstdc++.so.6 to point to the new one, and now everything works.
libstdc++.so.6: version `GLIBCXX_3.4.20' not found
Considering that /usr/lib/x86_64-linux-gnu/libproxy.so.1
is supplied by Ubuntu, let's assume that it is compatible with the system libstdc++ library. This means that the application is not actually using that system library, but some other version. I'd suggest to check if the application sets LD_LIBRARY_PATH
and if there is another copy of libstdc++.so.6
on that path. In this case, try moving it away or deleting it—the application should then switch to the system library, which is newer and should be backwards-compatible.
Related Topics
Std::Istream_Iterator<> with Copy_N() and Friends
Observer Design Pattern in C++
Get Device Path Based on Usb Vid:Pid in Linux
Compiler Support for Upcoming C++0X
Can't Use C++17 Features Using G++ 7.2 in Qtcreator
How to Force My Application to Open One Exe Only? Qt, Linux
Using Boost Tokenizer Escaped_List_Separator with Different Parameters
C++: What Is the Printf() Format Spec for "Float"
C++: How to Check Type of Files Without Extension
Static Initialization and Destruction of a Static Library's Globals Not Happening with G++
Does Class/Function Order Matter in C++
Opencv Cvsaveimage Jpeg Compression Factor
Std::Set Iterator Automatically Const
Programmatically Getting Per-Process Disk Io Statistics on Windows