问题描述
编译 vddk 时报错:
/usr/bin/ld: cannot find -lthrift
collect2: 错误:ld 返回 1
make: *** [vddk] 错误 1
或者报如下错误:
In file included from VddkService.cpp:7:0:
VddkService.h:10:39: 致命错误:thrift/TDispatchProcessor.h:没有那个文件或目录
#include <thrift/TDispatchProcessor.h>
没有/usr/local/include/thrift 导致
解决方法
thrift make 后,需要make install 下,这样 thrift 的相关库文件就加载到 /usr/local/lib中了(install之前是没有加载的),不然 libtool 貌似只会把 .so 文件放在隐藏目录里,导致 cannot find -lthrift。