我想要Boost的静态通用二进制库。 (最好是最新的稳定版本,也就是1.43.0或更新版本。)将Boost编译为静态通用二进制库
我发现了很多类似的问题和可能的解决方案。但是,他们大多数似乎过时了。也没有人真的有效。
现在,我想
sudo ./bjam --toolset=darwin --link=static --threading=multi \
--architecture=combined --address-model=32_64 \
--macosx-version=10.4 --macosx-version-min=10.4 \
install
,编译和安装罚款。但是,生成的二进制文件似乎已破解。
[email protected] 47 (openlierox) %file /usr/local/lib/libboost_signals.a
/usr/local/lib/libboost_signals.a: current ar archive random library
[email protected] 49 (openlierox) %lipo -info /usr/local/lib/libboost_signals.a
input file /usr/local/lib/libboost_signals.a is not a fat file
Non-fat file: /usr/local/lib/libboost_signals.a is architecture: x86_64
编辑:看起来命令是错误的,我必须删除大多数选项的“ - ”。所以,我现在想的命令(-a只是意味着重建所有):
sudo ./bjam -a toolset=darwin link=static threading=multi \
architecture=combined address-model=32_64 \
macosx-version=10.4 macosx-version-min=10.4 \
install
然而,这给了许多奇怪的错误(我已经早些时候曾),所有这样的:
darwin.compile.c++.pch bin.v2/libs/math/build/darwin-4.2.1/release/address-model-32_64/architecture-combined/link-static/macosx-version-min-10.4/macosx-version-10.4/threading-multi/../src/tr1/pch.hpp.gch
In file included from ./boost/math/special_functions/acosh.hpp:18,
from ./boost/math/special_functions.hpp:15,
from libs/math/build/../src/tr1/pch.hpp:9:
./boost/config/no_tr1/cmath.hpp:21:19: error: cmath: No such file or directory
这可能是我在构建通用二进制文件时遇到的另一个问题:g++ on MacOSX doesn't work with -arch ppc64
看到我的答案。使它与GCC 4.2一起工作的修复很容易。并且工作得很好。但是,无论如何感谢您的信息,这在稍后的时间对我来说可能仍然有用。 – Albert 2010-05-14 00:56:05
这个答案比在SDK上黑客更好。 – paleozogt 2011-02-21 17:41:01