I am new to LLVM and wanted to experiment with the Kaleidoscope example. My PC is a Windows 64 bit system. I managed to build LLVM from source with CMake. I managed to build the examples of Kaleidoscope with Visual Studio 15 2017 from the .vcxproj file. The built toy.exe from chapter 8 runs well from the command line and I could enter the function definition for average as in the tutorial. toy wrote output.o to D:\llvm.bld\Debug\bin.
However, when I would like to compile and link the main.cpp as given in the tutorial I get:
clang++.exe: error: linker command failed with exit code 1143 (use -v to see invocation).
The full verbose output is copied below. How do you compile and link main.cpp and output.o on a Windows 64 bit PC?
D:\llvm.bld\Debug\bin>clang++ main.cpp output.o -o main -v