Code: Select all
pi@raspberrypi ~ $ cat /etc/debian_version
8.0
pi@raspberrypi ~ $
pi@raspberrypi ~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi ~ $ uname -a
Linux raspberrypi 4.4.7-v7+ #878 SMP Tue Apr 19 19:03:45 BST 2016 armv7l GNU/Linux
https://solarianprogrammer.com/2018/04 ... programs/
Code: Select all
pi@raspberrypi ~ $ echo 'export PATH=/usr/local/clang_8.0.0/bin:$PATH' >> .bashrc
pi@raspberrypi ~ $ echo 'export LD_LIBRARY_PATH=/usr/local/clang_8.0.0/lib:$LD_LIBRARY_PATH' >> .bashrc
pi@raspberrypi ~ $ source .bashrc
pi@raspberrypi ~ $ clang --version
clang: /lib/arm-linux-gnueabihf/libtinfo.so.5: no version information available (required by clang)
clang: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by clang)
pi@raspberrypi ~ $
Code: Select all
W: Failed to fetch http://raspberrypi.collabora.com/dists/wheezy/InRelease
W: Failed to fetch http://raspberrypi.collabora.com/dists/wheezy/Release.gpg Could not resolve 'raspberrypi.collabora.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
My end requirement is i want to execute my program below :
Code: Select all
#include <iostream>
#include <thread>
int main()
{
std::thread th([]() {
std::cout << "Hello, World!" << std::endl;
});
th.join();
return 0;
}
Code: Select all
clang++ -o demo demo.cpp -lpthread -std=c++11Code: Select all
Hello Wold!Code: Select all
Raspbian clang version 3.5.0-10+rpi1 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: arm-unknown-linux-gnueabihf
Thread model: posix
Code: Select all
pi@raspberrypi ~ $ ./demo
pure virtual method called
terminate called without an active exception
Aborted