Skip to content

Instantly share code, notes, and snippets.

@sol-prog
Last active May 17, 2019 17:48
Show Gist options
  • Save sol-prog/b1ccd0207996b896529ae6b79501f76d to your computer and use it in GitHub Desktop.
Save sol-prog/b1ccd0207996b896529ae6b79501f76d to your computer and use it in GitHub Desktop.
Install Clang 8 in Raspberry Pi and compile C++ programs
# Add to end of your .bashrc file:
export PATH=/usr/local/clang_8.0.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/clang_8.0.0/lib:$LD_LIBRARY_PATH
// Build/compile with:
// clang++ -std=c++17 -stdlib=libc++ -Wall -pedantic fs_test.cpp -o fs_test -lc++fs
#include <iostream>
#include <filesystem>
int main() {
for(auto &file : std::filesystem::recursive_directory_iterator("./")) {
std::cout << file.path() << '\n';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment