码迷,mamicode.com
首页 > 其他好文 > 详细

VSCode cpptools 插件在Centos 7下不能正确显示符号列表的解决办法

时间:2016-12-14 13:45:29      阅读:458      评论:0      收藏:0      [点我收藏+]

标签:otherwise   without   不能   ons   后台服务   ftp   dir   hang   ppt   

vscode 的插件cpptools 0.9.3 需要glibc 2.18的版本,但是Centos 7 下没有这个版本的GLIBC,所以导致链接库丢失,后台服务不能正常运行。按以下步骤操作可修复此问题。

With the 0.9.3 it seems that both GLIBC_2.18 & GLIBC_2.17 is required.
However if you want a workaround try this:

  1. wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.xz
  2. tar xvf glibc-2.18.tar.xz
  3. cd glibc-2.18
  4. mkdir build
  5. cd build
  6. ../configure --prefix=/opt/glibc-2.18
  7. sudo make install
  8. 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  
  1. 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 are fine, otherwise add missing dependencies to the --library-path option in the script,
    if not you will see 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)
  1. Modify "~/.vscode/extensions/ms-vscode.cpptools-0.9.3/out/src/LanguageServer/C_Cpp.js"
    Change the following line from " extensionsProcessName += ‘.linux‘; " to " extensionProcessName += ‘.linux.sh‘; "

 

VSCode cpptools 插件在Centos 7下不能正确显示符号列表的解决办法

标签:otherwise   without   不能   ons   后台服务   ftp   dir   hang   ppt   

原文地址:http://www.cnblogs.com/albertclass/p/6178797.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!