[LLVMdev] Execution Engine issue with composite module

Clemens Hammacher hammacher at cs.uni-saarland.de
Mon Dec 17 02:23:29 PST 2012

Hi Charles,

> then i proceed to create the executionEngine:
>              llvm::EngineBuilder eB(executableModule);
>              eB.setEngineKind(llvm::EngineKind::JIT);
>              llvmEngine = eB.create();
> which seems to go well, but as soon as i run:
>             llvm::Function* foo2 = moduleX->getFunction("foo2");
>             engine->getPointerToFunction(foo2);
> i get the error:
> LLVM ERROR: Program used external function 'foo' which could not be resolved!

Make sure that you get the Function* in the linked module, which is 
being executed by the ExecutionEngine (executableModule in your case).


More information about the llvm-dev mailing list