VSCode cpptools 外掛程式在Centos 7下不能正確顯示符號列表的解決辦法

來源:互聯網
上載者:User

標籤: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下不能正確顯示符號列表的解決辦法

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.