I am having libcommon.so in the /usr/local/lib and I am linking this library in my program.
gcc -o test test_prog.c -L/usr/local/lib -llibcommon.so
and I have tried this too
gcc -o test test_prog.c -L/usr/local/lib -llibcommon
It's giving
/usr/bin/ld: cannot find -llibcommon.so
collect2: ld returned 1 exit status
It is there:
$ locate libcommon.so
/usr/local/lib/libcommon.so
/usr/local/lib/libcommon.so.0
/usr/local/lib/libcommon.so.0.1.0
$