Vscode plug-in cpptools 0.9.3 need glibc 2.18 version, but CentOS 7 does not have this version of glibc, so the link library is lost, the background service does not work. Follow these steps to fix this problem.
With the 0.9.3 it seems, both glibc_2.18 & glibc_2.17 is required.
However if want a workaround try this:
- wget HTTP://FTP.GNU.ORG/GNU/GLIBC/GLIBC-2.18.TAR.XZ
- Tar xvf glibc-2.18.tar.xz
- CD glibc-2.18
- mkdir Build
- CD Build
- .. /configure--prefix=/opt/glibc-2.18
- sudo make install
- Create a bash script file called Microsoft.VSCode.CPP.Extension.linux.sh in "~/.vscode/extension/ Ms-vscode.cpptools-0.9.3/bin "with the following contents ...
#!/bin/bash /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 --library-path /opt/glibc-2.18/lib:/lib64:/usr/local/lib64 ~/.vscode/extensions/ms-vscode.cpptools-0.9.3/bin/Microsoft.VSCode.CPP.Extension.linux
- chmod a+x Microsoft.VSCode.CPP.Extension.linux.sh
You can try-to-start it on the comand line./microsoft.vscode.cpp.extension.linux.sh
If It starts silently without errors, then you is fine, otherwise add missing dependencies to the--library-path option I n the script,
If you'll see the something like this,
./Microsoft.VSCode.CPP.Extension.linux: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.18‘ not found (required by ./Microsoft.VSCode.CPP.Extension.linux)./Microsoft.VSCode.CPP.Extension.linux: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.17‘ not found (required by ./Microsoft.VSCode.CPP.Extension.linux)
- Modify "~/.vscode/extensions/ms-vscode.cpptools-0.9.3/out/src/languageserver/c_cpp.js"
The following line from "Extensionsprocessname + =". Linux '; "to" extensionprocessname + = '. linux.sh '; "
Vscode Cpptools Plugin does not display the symbol list correctly in CentOS 7 solution