Is it incorrect/undefined behavior when libraries are linked using relative path?
13:24 23 Dec 2025

I am building a shared library A which depends on another shared library B present in another directory dir1. When I link shared library B to A with relative path using -L../dir1 it builds fine. But when I do ldd -r A , it says B => not found.

makefile gnu-make