[LLVMdev] using llvm as library from xcode project?

Rob Nikander rob.nikander at gmail.com
Tue Jan 11 16:16:39 PST 2011


Hi all,

I just downloaded and compiled LLVM and I'd like to use the JIT API in
a project that I've got in Xcode.  I'm confused because I thought I
could use LLVM like a library, but it seems I can't simply include
some headers and link to lib, as usual.  Or can I?  I don't see a
framework or dylib file, which I would usually add to my Xcode
project.  The /usr/local/lib directory has a bunch of .a files.

This page (http://llvm.org/docs/Projects.html) suggests that I need to
learn about the LLVM build system.   If so, why?

I tried simply adding all the .a files in /usr/local/lib, but my
programs fails at:

    engine = EngineBuilder(module).setErrorStr(&err).create();

The 'engine' is null, and 'err' is "Interpreter has not been linked in.".

thanks,
Rob




More information about the llvm-dev mailing list