opt: symbol lookup error:

Hello,

I am a newbie of llvm. I want to learn how to use llvm pass, but when I test the tutorial hello pass, the following error comes up.

opt: symbol lookup error: /home/mqk/software/llvm/llvm-3.4/Release+Asserts/lib/LLVMHello.so: undefined symbol: _ZN4llvm9Statistic17RegisterStatisticEv

I have read the answer suplied by "Arnamoy Bhattacharyya arnamoy at ualberta.ca " and I have also built llvm in one and only directory, but the problem remains. Could anybody help me fix this? thank you very much!

You can use the c++filt program to print a more readable version of the symbol. When I use "c++filt __ llvm::Statistic::RegisterStatistic() You need to find the LLVM library that defines this method and link it into your pass by adding it to the LIBS or USEDLIBS variable in the Makefile (or something similar). Regards, John Criswell