alecbenzer
2010-Aug-12 16:59 UTC
[LLVMdev] error when trying to create a JIT execution engine "Interpreter has not been linked in"
I've been following this guide: http://llvm.org/docs/tutorial/LangImpl4.html and am getting an error when trying to create an execution engine. When running this code: executionEngine = llvm::EngineBuilder(module).setErrorStr(&errStr).create(); errStr contains: "Interpreter has not been linked in." I'm using this command to build: g++ -g errors.o lexer.o parser.o lang.o main.o -rdynamic `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o llvm-lisp (my whole Makefile: http://pastebin.com/v33V48bH) I'm on 64bit linux (ubuntu 10.04). What's causing the problem? -- View this message in context: http://old.nabble.com/error-when-trying-to-create-a-JIT-execution-engine-%22Interpreter-has-not-been-linked-in%22-tp29420877p29420877.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Óscar Fuentes
2010-Aug-12 17:15 UTC
[LLVMdev] error when trying to create a JIT execution engine "Interpreter has not been linked in"
alecbenzer <alecbenzer at gmail.com> writes:> I've been following this guide: http://llvm.org/docs/tutorial/LangImpl4.html > and am getting an error when trying to create an execution engine. When > running this code: > > executionEngine = llvm::EngineBuilder(module).setErrorStr(&errStr).create(); > > errStr contains: "Interpreter has not been linked in." I'm using this > command to build: > > g++ -g errors.o lexer.o parser.o lang.o main.o -rdynamic `llvm-config > --cppflags --ldflags --libs core jit native` -O3 -o llvm-lisp > (my whole Makefile: http://pastebin.com/v33V48bH) > > I'm on 64bit linux (ubuntu 10.04). What's causing the problem?Probably you are not calling InitializeNativeTarget. Add this to your source code: .... #include "llvm/Target/TargetSelect.h" ... int main() { InitializeNativeTarget(); ...