0

I am compiling my own .so library which uses other (external) .so library. I created my own CMakeLists.txt. For external library I use provided CMakeList.txt and add it to project in my CMakeLists.txt (add_subdirectory). I got stuck with linking. My library can't load external module.

It says

undefined symbol: _Z13SomeFunctionhhhiiiPchhddhhhS_h

When I check external .so module for symbol I found

_Z13SomeFunctionbbbiiiPcbbddbbbS_b

Thus, symbol is presented in .so module, but names do not match.

Any help?

1 Answers1

-1

I think the compiler cannot find .so moduls. You probably have to compile with these flags -L and -l. If your lib is called libmy.so you will have to use: g++ *.c -L path/to/libmy/ -lmy

EDIT

The external lib.so path must be in the LD_PRELOAD environment variable, check this then.