在 Windows 7 上构建 Bitcoin 遇到的问题

中本聪SN-2764

出错的是以下几行:

The lines it's tripping on:

ERROR extern map<string, string> mapAddressBook;
ERROR extern CCriticalSection cs_mapAddressBook;
ERROR extern vector<unsigned char> vchDefaultKey;
OK extern bool fClient;
OK extern int nBestHeight;

OK extern unsigned int nWalletDBUpdated;
ERROR extern DbEnv dbenv;

因此它的表现就像什么都未定义,连 map 和 vector 都没有。

So it's acting like nothing is defined, not even map and vector.

但 db.h 是被 headers.h 包含的(而且只在那里,别处都没有),而 headers.h 在 db.h 之前就包含了 vector、map、util.h 等等。

Yet, db.h is included by headers.h (and only there, nowhere else) which includes vector, map, util.h and everything before db.h.

是不是 VC 在用预编译头并搞砸了?会不会是你目录里残留着以前失败尝试留下的预编译头文件,被它找到并使用了?

Is VC trying to use precompiled headers and screwing it up? Could there be some leftover precompiled header files in your directory from previously failed attempts that it's finding and using?

现在有一个安装包,让 MinGW 的安装变得相当简单。别用最新的 4.5.0,用往前几个版本,比如 4.4.1(1.908.0)或 1.812.0。安装程序会完整装好一切,不像以前那么难。我记得我唯一要做的是把 make*.exe 之类的名字改成 make.exe。

There's an installer package now that makes it really easy to install MinGW. Don't use the latest version 4.5.0, use a few versions back like 4.4.1 (1.908.0) or 1.812.0. A setup program completely installs everything, it's not hard like it used to be. I think the only thing I had to do was rename make*.exe something to make.exe.

跑题说一句:要是有人能让 tcatm 的 4 路 128 位 SSE2 代码在 Windows 上跑起来就好了。MinGW 的优化有些问题,我不确定,也许是栈上 16 字节对齐的问题,导致段错误。经过一番摆弄,我让他的代码在一个测试程序里跑起来了,但不知为何在 Bitcoin 本体里不行。

Off topic, but: It would be nice if someone would hack on getting tcatm's 4-way 128-bit SSE2 code working on Windows. There's something with MinGW's optimisation, I'm not sure but maybe a problem with 16-byte alignment on the stack, that makes it segfault. With some fiddling, I was able to get his code to work in a test program, but not in Bitcoin itself for some reason.

上下文
译文校对、修订与纠错

当前版本尚未建立逐条校对状态记录。来源核验、历史审校与当前译文校对是不同事项。

查看历史审校与代表修订 →

译文内容版本:dbb7ab9b11e4。用于比对文本,不代表校对等级或更新时间。

准备纠错说明

请填写对应原文、现译文、建议译法和理由。复制后通过你联系本站作者的渠道提交;此处不会自动发送。

来源
英文原标题

Issues building bitcoin on Windows 7

Bitcointalk · 原始链接 ↗ 记录编号 SN-2764

阅读字号

选择适合你的字号,之后阅读会继续使用。