0

Is it possible that there are 2 versions of libstdc++.so.6 installed, and while compiling it is using a different version


In my code I am reading a binary file and storing the data in mysql server.

While compiling the file. The file compiles properly. Command used for compiling

g++ -std=c++11 -Wall -I/usr/include -o mkt MtkF.cpp -L/usr/lib -lmysqlcppconn

While running the file I get and error as -

libstdc++.so.6: version `GLIBCXX_3.4.20'  required by /lib/libmysqlcppconn.so.7
libstdc++.so.6: version `GLIBCXX_3.4.21'  required by /lib/libmysqlcppconn.so.7

OS CentOS

On running this command -

strings /usr/lib64/libstdc++.so.6 | grep LIBCXX

It return values till GLIBC19

Have looked at other solutions also, but no luck.

Viraj Talaty
  • 15
  • 2
  • 6
  • your mysql library was built with newer g++ than your libstdc++, upgrade libstdc++ or build your mysql library by the built-in gcc of your distro – Danh Mar 23 '17 at 10:27
  • 1
    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) – Danh Mar 23 '17 at 10:30
  • Hi Danh, can you provide me with the command using which I can upgrade to the new library – Viraj Talaty Mar 23 '17 at 11:19
  • is it possible that there are 2 versions of libstdc++.so.6 installed, and while compiling it is using a different version @Danh. Because the file i already updated – Viraj Talaty Mar 24 '17 at 12:44

0 Answers0