Is there documentation somewhere on how to call external functions from llvm? The only guide I found was this: <meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.gearleaf.com/blog/post/44">http://www.gearleaf.com/blog/post/44</a>, and it doesn't seem to be working for me.<div>

<br></div><div>I have a function:</div><div><br></div><div><div>llvm::GenericValue lle_X_create_number_object(llvm::FunctionType* ft, const std::vector<llvm::GenericValue>& args)</div><div>{</div><div>  llvm_object_structure* result = new llvm_object_structure;</div>

<div>  result->typeIdx = TypeSystem::number;</div><div>  result->data = reinterpret_cast<unsigned char*>(new double(args[0].DoubleVal));</div><div>  llvm::GenericValue gv;</div><div>  gv.PointerVal = reinterpret_cast<void*>(result);</div>

<div>  return gv;</div><div>}</div></div><div><br></div><div>defined in an extern "C" block. I add it as a symbol with: </div><div><br></div><div><div>llvm::sys::DynamicLibrary::AddSymbol("lle_X_create_number_object",(void*)lle_X_create_number_object);</div>

</div><div><br></div><div>yet when attempting to call it I still get: "LLVM ERROR: Program used external function 'create_number_object' which could not be resolved!"</div>