[LLVMdev] ExecutionEngine::create returns 0

Eric Christopher echristo at apple.com
Tue Sep 28 01:00:31 PDT 2010


> 
> I am using llvm 2.6 and I am getting the same error. I tried using
> llvm-config with flags '--libs core engine jit native'. But ExecutionEngine
> returns NULL. I even tried including the JIT.h. No luck there too.
> 
> Here is my code listing:
>        llvm::ExecutionEngine* ee  = llvm::ExecutionEngine::create(mModule);
> 	llvm::Function* func = ee->FindFunctionNamed("main");
> 	typedef void (*PFN)();
> 	PFN pfn = reinterpret_cast<PFN> (ee->getPointerToFunction(func));
> 	pfn();
> 	delete ee;

More information would be helpful, if you have a program that someone else can compile or take a look at we might be able to help.

That said, 2.6 is pretty old at this point and I'm really only willing to look at failures with ToT. The HowToUseJIT example compiles and links just fine on ToT for me.


-eric



More information about the llvm-dev mailing list