c++ - Where do I see what parts of LLVM a library contain? -


i know how see libraries component correponds command:

llvm-config --libs core 

now, suppose linker error , wants include library resolve it.

say, linker can't resolve symbol a. how i:

1) find library contains specific symbol, e.g. llvmcore.lib.

2) contents of libraries see symbols defines?

i don't understand how reading documentation.

as have discovered proper llvm-way using llvm-config indicating components intend link against or use, e.g.

llvm-config --cxxflags --ldflags --system-libs --libs core 

other common non-llvm specific methods can use find symbol: on win platform (use vs native tools cmd or equivalent environment-set one):

for %f in (*.lib) (dumpbin.exe /symbols %f | findstr /c:"your_symbol")  

if can't deal findstr's limitations gnu grep might better choice. if have unix tools installed , in path can use

for %f in (*.lib) (nm -gc %f | findstr /c:"your_symbol") 

as baddger964 suggests.

on unix system:

for lib in $(find . -name \*.so) ; nm -gc $lib | grep my_symbol | grep -v " u " ; done 

(search *.so libraries in directory my_symbol; extern-only, demangle , exclude undefined symbols)

given above question 2 trivial.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -