[LLVMdev] Unresolveable fallthrough functions

mriou matthieu.riou at gmail.com
Mon Sep 1 11:17:32 PDT 2008



Anton Korobeynikov wrote:
> 
> Hello,
> 
>> ready> ERROR: Program used external function 'putchard' which could not
>> be
>> resolved!
>> Any idea of what could be wrong?
> Please make sure you're using C linkage for such functions, due to
> mangling the name of 
> function being emitted is not "putchard". Something like this:
> 
> extern "C" void putchard(char c) {
>  ...
> }
> 
> Or, just provide a mapping by hands (if you're on platform without dynamic
> linking, e.g. on 
> windows)
> 

Thanks for the reply. I'm on Linux and the function is extern'd:

extern "C" double putchard(double X) {
  putchar((char)X);
  return 0;
}

Using the sin(x) and cos(x) functions work though, only the ones included in
the main file don't. So I'm a bit puzzled...

Thanks,
Matthieu

-- 
View this message in context: http://www.nabble.com/Unresolveable-fallthrough-functions-tp19249293p19258704.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list