Loading clang example plugin error (Symbol not found: __ZN5clang11ASTConsumer21HandleInterestingDeclENS_12DeclGroupRefE)

there is related post

I have build example from clang sources (libPrintFunctionNames.dylib),
and I am trying to load plugin with xcode project,
but there is error:

error: unable to load plugin
'dlopen(/Users/.../llvm/Debug+Asserts/lib/libPrintFunctionNames.dylib, 9):
Symbol not found:
__ZN5clang11ASTConsumer21HandleInterestingDeclENS_12DeclGroupRefE Referenced
in: flat namespace in
/Users/.../llvm/Debug+Asserts/lib/libPrintFunctionNames.dylib' Command
failed with exit code 1

I have tried to use libPrintFunctionNames.a instead of
libPrintFunctionNames.dylib, but it did not help me.
What am I doing wrong?

Also I have some questions:

1. If I use clang::Rewriter class for changing sources, but don't use
overwriteChangedFiles() method in plugin.
Would my changes be applied in that compilation action? Or I should call
I do not want make permanent changes on source code.

2. I would like to save all commands generated by Xcode, because it is
difficult to create and pass those commands for every Xcode project.
That is the reason why I choose to use clang plugin but not clang tool.
My clang plugin is run as a completely new instance for each source file,
but I need to pass some common information from source to source (I need to
divide classes from standard frameworks and Classes
from project, to apply my changes only on classes that belong to my
How can I do achieve this?
To divide classes from standard frameworks and Classes from project,
or to pass some common information from plugin instance to plugin instance.

Thank you! Sorry for my English.

maybe the cause of loading plugin error is that I Build my plugin on
separated source files of llvm and clang, and in xcode I use other version
of clang. I will check that.