如何在Ubuntu Trusty上安装libc ++ 3.9而无需从源代码构建

时间:2017-09-15 06:21:28

标签: c++ ubuntu installation ubuntu-14.04 libc++

我目前在Ubuntu Trusty上安装libc ++ 3.9的尝试如下:

wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
sudo add-apt-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain.trusty-3.9 main"
sudo apt-get update
sudo apt-get install clang-3.9 lldb-3.9

我的main.cpp就是这样:

// main.cpp
#include <iostream>
int main()
{
    std::cout << _LIBCPP_VERSION << std::endl;
}

但是编译并运行它

clang++-3.9 -stdlib=libc++ main.cpp 
./a.out

打印

1101

这是libc ++ svn199600的版本号,是Trusty上提供的默认版本号。

如何在不构建源代码的情况下更新到版本3.9?

0 个答案:

没有答案