[LLVMdev] LLVM Basic Program Compilation

Tim Northover t.p.northover at gmail.com
Sat Aug 2 02:01:53 PDT 2014


> I modified my code add the main function :

Well, that will only declare @main, I believe. You need to add an
actual function body to be able to execute it, but that problem can
wait until later.

> and when i compile with the commands you specified i get the following
> error:

I'm afraid I can't explain that. I can only reproduce the same results
if I omit the "--libs" flag from llvm-config, so it looks like your
LLVM installation might be broken in some way.

> As you mentioned try.s is unlinked, Can you please tell me how i will link
> it.

You don't need to for what you're doing (not yet a while anyway). That
would only be relevant if you actually meant to do that complicated
self-referential compilation you started with, but it sounds like that
was a mistake.

Cheers.

Tim.



More information about the llvm-dev mailing list