Clang C++ Cross Compiler – Generating Windows Executable from Mac OS X

Here are step-by-step instructions for building a Hello World .exe using llvm/clang on Mac OS X. Cross-compile Hello World for Windows using Clang/LLVM on Mac OS X Install llvm with homebrew. This will include the clang and the llvm linker. brew install llvm You’ll need access to Visual Studio C++ libraries and headers, which are … Read more

Clang doesn’t see basic headers

This is because g++ is not installed, so libstdc++ is not present. You can install g++, or if LLVM is preferred, install LLVM libc++ and specify that you want to use it, like so: sudo apt-get install libc++-dev clang++ -stdlib=libc++ <rest of arguments> You may wish to link /usr/bin/c++ to the default compiler: ln -s … Read more