Trouble compiling PrintFunctionNames plugin example

Hi,

On Mac OS X 10.8.2, I installed clang following instructions here:

http://clang.llvm.org/get_started.html

At the root of the llvm directory, I ran:

./configure
make BUILD_EXAMPLES=1

When compiling the PrintFunctionNames plugin example, I see the warnings below. From instructions in llvm/tools/clang/examples/PrintFunctionNames/README.txt, I expect ld to emit libPrintFunctionNames.dylib, however no dynamic library is generated in clang/examples/PrintFunctionNames/Debug+Asserts.

Any idea what I’m doing wrong? :slight_smile:

llvm[4]: Linking Debug+Asserts Shared Library libPrintFunctionNames.dylib
ld: warning: cannot export hidden symbol llvm::Registry<clang::PluginASTAction, llvm::RegistryTraitsclang::PluginASTAction >::node::node(llvm::SimpleRegistryEntryclang::PluginASTAction const&) from /Users/bduff/Documents/Development/clang/llvm/llvm/tools/clang/examples/PrintFunctionNames/Debug+Asserts/PrintFunctionNames.o
ld: warning: cannot export hidden symbol llvm::Registry<clang::PluginASTAction, llvm::RegistryTraitsclang::PluginASTAction >::node::node(llvm::SimpleRegistryEntryclang::PluginASTAction const&) from /Users/bduff/Documents/Development/clang/llvm/llvm/tools/clang/examples/PrintFunctionNames/Debug+Asserts/PrintFunctionNames.o
ld: warning: cannot export hidden symbol llvm::Registry<clang::PluginASTAction, llvm::RegistryTraitsclang::PluginASTAction >::Announce(llvm::SimpleRegistryEntryclang::PluginASTAction const&) from /Users/bduff/Documents/Development/clang/llvm/llvm/tools/clang/examples/PrintFunctionNames/Debug+Asserts/PrintFunctionNames.o
llvm[4]: Building Debug+Asserts Archive Library libPrintFunctionNames.a