[LLVMdev] symbol not found (running passes by tools)

Duncan Sands baldrick at free.fr
Sun Jun 5 09:51:25 PDT 2011


Hi Andreas,

> I'd like to call some passes by an executable in the tools directory of my project.
> Unfortunately I get following error messages on executing the tool:
>
> dyld: lazy symbol binding failed: Symbol not found: __ZN4llvm9Statistic17RegisterStatisticEv and
> dyld: Symbol not found: __ZN4llvm9Statistic17RegisterStatisticEv
>
> This is because of the STATISTIC macro in one of the passes. If I comment the macro-call everything
> works fine. So do you know how to tell the linker where it can find the RegisterStatistic function?

did you compile your passes with the same flags you compiled LLVM with, i.e.
assertions on (or off) in both, optimization on (or off) in both etc?

Ciao, Duncan.



More information about the llvm-dev mailing list