gcc -o test main.c IPT.c logitem_list.c -L -./ -libpt
/usr/bin/ld: cannot find -libpt
collect2: error: ld returned 1 exit status
You specify the directory to
-L and the 'core' name to
gcc -o test main.c IPT.c logitem_list.c -L . -lpt
pt, the linker looks for
libpt.so or equivalents (extensions like
.lib on other platforms).
-L -./ is suggesting that the linker look in a directory called 'dash dot', which is unlikely to exist and isn't where
libpt.a is found anyway.