Change @libdir@ in the pkg-config file to be $(usrlibdir) The variable in the .pc file points to the directory where the .so symlink is present, which is never going to be something like /lib, but something like /usr/lib.