Try to omit linking stage (fpc -s yourfile.pas) and open link.res, so you can check if paths are correct and if the lib is passed to the linker with the exact name