I have downloaded the GNU Arm Embedded Toolchain (https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads), I downloaded the binary of LLVM, Win 32 bit (https://releases.llvm.org/download.html), and I am trying to compile a simple cpp:
#include <stdio.h> int main(void) { int count=0; count++; printf("Count %d", count); return count; }
From the windows command prompt I tried to compile it with following: "C:\Program Files (x86)\LLVM\bin\clang++.exe" "C:\test\ProgramCpp\clang.cpp" -target armv7a-none-eabi "-IC:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major\arm-none-eabi\include" "-LC:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major\arm-none-eabi\lib\arm\v5te\hard" -fuse-ld=lld -v
I got following errors:
ld.lld: error: unable to find library -lc++ ld.lld: error: unable to find library -lc++abi ld.lld: error: unable to find library -lunwind ld.lld: error: unable to find library -lclang_rt.builtins-armv7a clang++: error: ld.lld command failed with exit code 1
On my main development mashine I got Visual Studio 2017. On my other development mashine, where I do not have Visual Studio, I got msys2 with mingw-w64-x86_64-toolchain, with gcc 10.2.0. On booth mashines I got CMake3.19.2