How gcc decide to use dynamics library when creating executable?

I am creating an executable with this: gcc elliptical.o -Llibs -lhfcal -o elliptical In my libs sub folder there are: libhfcal.a libhfcal.so files. My purpose is to use dynamic library but still i didnt understand how it choose .so file when i didnt explicitly refer it. I know it try to use .so because when… Read More How gcc decide to use dynamics library when creating executable?