在linux环境编译应用程式或lib的source code时常常会出现如下的错误讯息
- /usr/bin/ld: cannot find -lxxx
其中xxx即表示函式库文件名称,如上例的:libc.so、libltdl.so、libXtst.so。
其命名规则是:lib+库名(即xxx)+.so。
一般可以sudo apt-get install lib+库名来解决
但是出现/usr/bin/ld: cannot find -lXp问题比较复杂,无法通过上述解决办法安装。
需要解决的是libXp.so.6库文件
通过sudo apt-get install x11proto-print-dev可以解决。其包含libXp.so.6