I have a libA.so that depends on libB.so, which is located at ../libB/ (from libA.c). I’m trying to compile things in such a way that I don’t have to set any environment variables. I have: This compiles fine. When I run a program that loads libA with dlopen I get: so libA is not finding libB at runtime. I found
Tag: dynamic-linking
cmake linking shared libraries on ubuntu
Hi I am having problems with linking two libraries on ubuntu using cmake 2.8.12 Directory structure CMakeLists.txt for lib1 This builds fine. Then for lib2 I have the following CMakeLists.txt Here I get Linking CXX shared library ../build/liblib2.so /usr/bin/ld: cannot find -llib1 I am not clear how to correctly link these two shared libraries using CMake. Anyone an idea what