Skip to content

回复:Linux 构建 ​

首次公开证据

打开首次公开证据
查看 1 个交叉存档
来源说明

Published on GitHub in February 2024 as part of Martti Malmi's testimony in the COPA v. Wright trial

已经差不多了。我修复了几个问题,让它完成了编译,但我不知道要链接哪些系统库,所以出现了大量未定义引用。

我修改了 makefile,让它在 /usr/local 及其默认的“make install”位置下查找内容。我把所做的修改和使用的开关写在 build-unix.txt 中。目前我暂时使用 wxWidgets 2.8.9,因为它和 Windows 上的版本相同,我不想同时考虑版本变化和平台变化的问题。不过 2.8.10 或 2.9.0 可能也没问题。我采用了 wxWidgets 的单库编译,因为我们无论如何几乎都要链接到每个库。

我添加了 xpm 文件,这就是除了 Windows 以外其他地方普遍使用的文件,而不是 RC 文件。它们是定义静态数组中图形的聪明 C 文件。bitcoin 图标有 5 个不同版本,但我无法弄清楚 xpm 中如何处理,所以只放了最大的一个。也许 GTK 会替你缩放。我不知道这些是否正确,不过它们能编译。

我把目前移植的内容上传到了 svn/branches。Util、script、db 和头文件现在已经全部编译通过,net.cpp 则是部分通过,所以还有工作要做。

_beginthread 没有直接对应的 Linux 实现,所以我改用了 Boost 线程。

英文原文 ​

展开英文原文

It was almost there. I fixed a few things and got it to finish compiling but I don't know the system libraries to link to so there's undefined references galore.

I changed the makefile to look for things under /usr/local and in their default "make install" locations. I wrote what I did and switches I used in build-unix.txt. I'm currently using wxWidgets 2.8.9 for now because it's the same version as on Windows and I don't want to wonder if there's version change issues at the same time as platform change. 2.8.10 or 2.9.0 are probably fine though. I went with the single-library compile of wxWidgets since we're linking to almost every library anyway.

I added xpm files, which is what they use everywhere else but Windows instead of RC files. They're clever C files that define graphics in static arrays. The bitcoin icon has 5 different versions but I couldn't figure out how that works in xpm so I only put the biggest one. Maybe on GTK it scales it for you. I don't know if these are right or what, but they compile.

I uploaded what I've ported so far to the svn/branches. Util, script, db and the headers compile fully now and net.cpp partially, so there's still work to do.

_beginthread doesn't have a direct Linux equivalent, so I used Boost threads instead.

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。