我正在尝试在我的 EC2 实例上编译比特币,但遇到了一个我无法弄清楚的问题。构建脚本在以下命令上停止
g++ -c -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE -DUSE_UPNP=1 -DUSE_IPV6=1 -I/home/ec2-user/bitcoin/src/leveldb/include -I/home/ec2-user/bitcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -I"/home/ec2-user/bitcoin/src" -I"/home/ec2-user/bitcoin/src/obj" -I"/usr/local/include" -I"/usr/include/openssl" -MMD -MF obj/alert.d -o obj/alert.o alert.cpp
通过返回以下错误
In file included from /usr/include/sys/socket.h:40:0,
from compat.h:19,
from netbase.h:11,
from util.h:27,
from alert.h:13,
from alert.cpp:11:
/usr/include/bits/socket.h:231:5: error: expected identifier before numeric constant
/usr/include/bits/socket.h:231:5: error: expected ‘}’ before numeric constant
/usr/include/bits/socket.h:231:5: error: expected unqualified-id before numeric constant
In file included from compat.h:19:0,
from netbase.h:11,
from util.h:27,
from alert.h:13,
from alert.cpp:11:
/usr/include/sys/socket.h:254:1: error: expected declaration before ‘}’ token
我尝试使用 -std=c++0x 选项集进行编译,但没有任何区别。这是我唯一能想到的。