[LLVMdev] LLVM Module Pass problem!

John Criswell criswell at cs.uiuc.edu
Thu Jul 23 07:18:12 PDT 2009

Saman Zonouz wrote:
> Dear All,
> I am new to LLVM and try to write a Module pass. In the same .cpp file
> I am defining a class.
> The problem is that whenever I instantiate an object from the class I
> get the following error while running the pass:
> opt: symbol lookup error: ../llvm/Debug/lib/MyPass.so: undefined
> symbol: _ZN10Thread_MyPassC1Ev
> The pass is compiled correctly but does not run.  Could you someone
> please let me know what is wrong?
Are the methods of your class defined within the same .cpp file or in
another .cpp file?  It appears that your pass is referencing those
methods but that they are not included within MyPass.so.

-- John T.

> Thanks in advance,
> ::Saman

More information about the llvm-dev mailing list