'C++ why the linker cant find the .so file?

iam trying to link a shared library , but the linker couldn't find it.

iam using this : g++ -std=c++20 -Wall -Wextra -L . hw01.o -llibrary -Wl,-rpath . -o hw01

but its not working .

**Picture 1: -----> 1

**Picture 2 : -----> 2



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source