How to debug error “Symbol lookup error: undefined symbol”

后端 未结 1 1310
执念已碎
执念已碎 2020-12-19 05:16

I created an app (api_tests) that uses a library (libstorage.so) that linked to oracle occi library (libocci.so.12.1) and compiled it. When I run this app, I get an error:<

相关标签:
1条回答
  • 2020-12-19 05:26

    nm libocci.so.12.1

    There are two problems with above command:

    1. You don't know whether libocci.so.12.1 is actually getting loaded into your process. To answer the "which libocci is getting loaded", run with LD_DEBUG=libs.
    2. Just because the symbol is present in the symbol table of libocci.so.12.1 doesn't mean that it's available for dynamic linking. It must be available in the dynamic symbol table, which you can examine with nm -D libocci.so.12.1
    0 讨论(0)
提交回复
热议问题