编译 FastDFS 时,报错如下
gcc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O1 -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c -I../common -I/usr/local/include
In file included from ../common/fdfs_global.c:21:0:
../common/fdfs_global.h:17:26: fatal error: sf/sf_global.h: No such file or directory
#include "sf/sf_global.h"
原因:
需要先编译和安装 libserverframe,新引入的网络框架库,下载地址:https://github.com/happyfish100
unzip libserverframe-master.zip
cd libserverframe-master/
./make.sh
./make.sh install
编译安装完后即可正常编译安装 FastDFS