Beginner Question on Linking

I am following along in http://llvm.org/docs/GettingStartedVS.html with a Hello World bitcode file. I can run the file using the command lli HelloWorld.bc, but now I want to link it into an executable file (on windows). The next thing the document says to run is llc -filetype=obj HelloWorld.bc which runs fine and now I have a HelloWorld.obj file. It’s the last step that is giving me some trouble. The command link hello.obj -defaultlib:libcmt in MinGW yields the following error: link: invalid option --d Try link --help for more information. I drop the -defaultlib:libcmt and the linker creates an executable but when I try to run it I get the following errors:

Popup:

"link" in those directions is supposed to refer to the "link" provided
by Visual Studio.

On MinGW, "gcc HelloWorld.obj" should create an actual executable.

-Eli