本文主要是介绍编译 FastDFS 时报错 fatal error: sf/sf_global.h: No such file or directory 解决办法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
编译 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
这篇关于编译 FastDFS 时报错 fatal error: sf/sf_global.h: No such file or directory 解决办法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!