Linux - Running Executable Error (GLIBCXX_3.4.21 n

2019-09-10 06:52发布

I'm trying to deploy my application as a stand-alone that can work on any Linux machine. I've built my application under Qt Creator and have successfully statically linked my application. However, when I test the application on another Linux machine, I get the following error:

libstdc++.so.6: version 'GLIBCXX_3.4.21' not found (required by ./Executable)

I'm not sure how to resolve this error.

标签: linux qt
1条回答
疯言疯语
2楼-- · 2019-09-10 07:16

This is a error i had myself, but in another context. What this means is: libstdc++.so.6 (a shared object file, the standard library of c++ programms, that many programms can use together(share)) is another version then the program you compiled requires.

i had this issue when switching from gcc-4.8 to gcc-5.

Have you using different linux distros when compiling and executing? (Ubuntu?)

You must make sure the versions match, or statically compile the used libstdc++ into your binary as well.

Here is a SO question relating to these kind of issues. GLIBCXX versions

查看更多
登录 后发表回答