编写zookeeper客户端程序出现以下编译错误:
/usr/local/include/zookeeper/recordio.h:76: error: expected unqualified-id before ‘__extension__’
/usr/local/include/zookeeper/recordio.h:76: error: expected ‘)’ before ‘__extension__’
/usr/local/include/zookeeper/recordio.h:76: error: expected unqualified-id before ‘)’ token
解决方法在http://blog.csdn.net/falcon2000/article/details/6895784
recordio.h:76 声明了htonll函数,其他文件可能对htonll做了宏定义,修改如下:
#ifndef htonll int64_t htonll(int64_t v); #endif
From http://www.cnblogs.com/caosiyang/