[LLVMdev] LLVM linkage error - Program used external function 'foo' which could not be resolved!

Cheng Zhu chengzhu at gmail.com
Mon Jan 5 14:07:20 PST 2015


Hi, All

I got a linkage error as indicated in the subject line. Any suggestion?

I created a call builder.CreateCall2(foo, p1, p2) in a module. foo is
a Function* generated by module->getOrInsertFunction("foo",
prototype). foo is defined outside of this module, and in the dump of
the module, I see "declare i64 @foo(xxx, xxx)". The error happens
during link time, it seems like my jitted function couldn't find foo
function defined outside of the module jitted function existed.

-- 
Best regards

Cheng



More information about the llvm-dev mailing list