[LLVMdev] Beginner Question on Linking
eli.friedman at gmail.com
Thu Sep 29 09:07:27 PDT 2011
On Thu, Sep 29, 2011 at 8:46 AM, Nathan Zaugg <nzaugg at gmail.com> wrote:
> 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`.
"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.
More information about the llvm-dev