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
On 01/11/2011 16:16, Rob Nikander wrote:> 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.". >You don't need XCode to compile llvm. It's best to supply --enable-shared to configure. This will build you libLLVM-2.9svn.dylib. This is the only library you need to link your app with. Yuri
On Tue, Jan 11, 2011 at 7:57 PM, Yuri <yuri at rawbw.com> wrote:> > It's best to supply --enable-shared to configure. This will build you > libLLVM-2.9svn.dylib. >Ah, thanks. I should have seen that configure option. Rob
Apparently Analagous Threads
- [LLVMdev] using llvm as library from xcode project?
- [LLVMdev] Valgrind memcheck errors in llvm
- [LLVMdev] Why -jit-emit-debug doesn't work with gdb-7.1 ?
- [LLVMdev] --enable-shared doesn't build shared library any more
- [LLVMdev] Why -jit-emit-debug doesn't work with gdb-7.1 ?