happyfish100 / libfastcommon

c common functions library extracted from my open source project FastDFS. this library is very simple and stable. functions including: string, logger, chain, hash, socket, ini file reader, base64 encode / decode, url encode / decode, fast timer, skiplist, object pool etc. detail info please see the c header files.
http://bbs.chinaunix.net/forum-240-1.html
GNU Lesser General Public License v3.0
900 stars 529 forks source link

libfastcommon编译不通过 #39

Closed hhlehh closed 2 years ago

hhlehh commented 3 years ago

common_define.h文件中:

define st_atimensec st_atim.tv_nsec

define st_mtimensec st_mtim.tv_nsec

define st_ctimensec st_ctim.tv_nsec

这几行内容编译时报错:error: expected ':', ',', ';', '}' or 'attribute' before '.' token,这是什么原因呢,这些内容的作用是什么,注释掉有什么影响吗

happyfish100 commented 3 years ago

你用的什么编译器及版本呢?

SakuraLQY commented 2 years ago

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:15:26: 致命错误:sf/sf_global.h:没有那个文件或目录 拉取最新的安装fastDfs不成功,少了很多文件

happyfish100 commented 2 years ago

需要先编译和安装 libserverframe,v6.09新引入的网络框架库。