문제

I am using google prof tools, and link my app with -lprofiler, but when I run this program: error while loading shared libraries: libprofiler.so.0: cannot open shared object file: No such file or directory

on the contrary, I link with -ltcmalloc then I do not need a tcmalloc.so at runtime.

I have already link the static lib for profiler, why should I need it at runtime?

도움이 되었습니까?

해결책

The static library just contains stubs for calling actual functions from the shared object dynamically. So you will need the .so as well. The static library makes your life easier, so that you don't have to write GetProcAddress() or whatever it is on your system.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top