How to build boost 1.45 universal binaries? on leopard/ snow leopard ?
相关问题
- Xcode debugger displays incorrect values for varia
- Is there a way to report errors in Apple documenta
- Advice for supporting both Mac and Windows Desktop
- Avoid cmake to add the flags -search_paths_first a
- installing packages for python 3
相关文章
- 现在使用swift开发ios应用好还是swift?
- Visual Studio Code, MAC OS X, OmniSharp server is
- xcode 4 garbage collection removed?
- IntelliJ IDEA can't open projects or add SDK o
- Automator: How do I use the Choose from List actio
- ImportError: No module named twisted.persisted.sty
- How can I vertically align my status bar item text
- git command-line on Mac OS error “dyld: Symbol not
To build universal binaries under Tiger I was creating
user-config.jam
file in my home directory ($HOME
):And then I was building Boost as usual with Jam. Probably this should still work with older Mac OS X versions.
Another way is to use MacPorts but in this case all Boost dependencies have to be rebuilt as universal binaries which is not always possible (I've this on Tiger for two times but failed).
For both cases you need to have MacOSX10.4u.sdk installed with XCode.
[edit]
To build for three architectures you'd better read an answer to a similar question. Briefly, build options in
user-config.jam
depend on your and target Mac OS X versions. So you'd better try various variants based on the aforementioned answer.To build 4-way universal boost static binaries on OSX 10.6 I do the following:
Download boost from the boost website.
Extract the archive and
cd
into theboost_x_xx_x
folder (wherex_xx_x
is the version of boost you are using).Run:
./bootstrap.sh
and then# The name of the Boost.Jam program changed from "bjam" to "b2" in Boost 1.47.0
# Replace "b2" with "bjam" if you are compiling a version <= 1.46.1
./b2 macosx-version=10.6 macosx-version-min=10.4 architecture=combined threading=multi link=static address-model=32_64
This will compile everything except for Boost.MPI (which requires the
--with-mpi
option). The build products get put in./stage
UPDATE: If you have installed XCode 4, then there is an extra step that you must perform. XCode 4 does not come with compilers or libraries capable of targeting PowerPC. Unfortunately, the compilers that come with XCode 4 become the default compilers used by Boost. To force the use of the compilers that come with XCode 3, you must perform an extra step. Note that you must install XCode 3 if it is not on your system.
After running
./bootstrap.sh
, and before runningb2
, open:Add following line to that file. This instructs boost to use the g++-4.2 from XCode 3:
Which libraries are you trying to build? It says here (http://www.boost.org/doc/libs/1_45_0/more/getting_started/unix-variants.html) that:
The one that you do need to build are:
So which one are you trying to build?