I build my program like this:
g++ -std=c++11 myprog.cpp -o myprog -lqpid-proton-cpp
Then I run ./myprog
and get this error:
symbol lookup error: ./myprog: undefined symbol: _ZN6proton10event_loop6injectESt8functionIFvvEE
Yet, nm reports the symbol is present in the library . . .
nm -D /usr/lib/libqpid-proton-cpp.so | grep _ZN6proton10event_loop6injectESt8functionIFvvEE
. . . yields:
000000000002f460 T _ZN6proton10event_loop6injectESt8functionIFvvEE
What am I missing here?
Did you verify, eg, using ldd myprog
, that you looked at the correct shared object? There is a chance a different shared object is found.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.