Index to libraries?

There wouldn't happen to be an index telling one which libraries
define which symbols, would there?

For example, if I'm told

alvm.o: In function `llvm::Function::Create(llvm::FunctionType const*, llvm::GlobalValue::LinkageTypes, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, llvm::Module*)':
/farhome/hendrik/dv/llvm/llvm/include/llvm/Function.h:118: undefined reference to `llvm::User::operator new(unsigned int, unsigned int)'

or

/farhome/hendrik/dv/lang/alvm/alvm.cpp:69: undefined reference to `llvm::FunctionType::get(llvm::Type const*, std::vector<llvm::Type const*, std::allocator<llvm::Type const*> > const&, bool)'

or even just

/farhome/hendrik/dv/lang/alvm/alvm.cpp:68: undefined reference to `llvm::Type::Int32Ty'

how should I go about finding the proper library to link with?

-- hendrik

Hi Hendrick,

All of the directories under llvm/lib correspond directly to the libraries that are built, so you should be able to just grep for the symbol definitions and add the corresponding library. Use llvm-config to discover transitive dependencies if possible.

Thanks. By following your instructions I managed to establish that my
problems lay elsewhere. That, in turn, enabled me to fix them.

The hardest place in a program to find a bug is anywhere the bug isn't.

-- hendrik