Linking executable error on Windows

I followed the build instructions for LLVM+clang -- that all went OK. But compiling a simple "hello world" program with clang++ gives a linker error -- see attached log file.

- Paul

build.log (1.84 KB)

I have been using MinGW to linking the output from clang successfully... I
did find that getting it to work correctly was a little tricky, in
particular, when passing object files to ld, the order is very important.
Specifically, you must pass crt initialization files first.

I use the following line to link a simple one file C++ program, %MWL% and
%GCL% are paths into the MinGW library directories.

ld -L %GCL% --subsystem console %MWL%crt2.o %GCL%crtbegin.o test-c-clang.o
-lmingw32 -lgcc_eh -lgcc -lmsvcrt -lkernel32 %GCL%crtend.o

This requires only using clang to compile the file to an object file using
the -c option, and the -o <object-file-name> option.

I don't think clang is compatible with Visual C++'s standard library
(with regards to compiler generated library calls)