Re: [Boost-users] How to build 32-bit Boost libraries on a 64-bit Linux machine using bjam?

1,318 views
Skip to first unread message

Gehua Yang

unread,
Jul 11, 2008, 12:30:57 PM7/11/08
to boost...@lists.boost.org
Hi Folks,

I am using Boost.Serialization and Boost.Thread in my project. Because current Boost release had problems with GCC 4.3, I had to build my own Boost libraries from a svn checkout. Fortunately, with the help from "Getting Started Guide", I accomplished the mission with ease. The commands I used are:
bjam --build-dir=/tmp/build-boost --toolset=gcc --build-type="release <threading>multi <link>static <runtime-link>static" stage
bjam --build-dir=/tmp/build-boost --toolset=gcc --build-type="release <threading>multi <link>static <runtime-link>static" --prefix=/software/boost-20080710 install

The above produced 64-bit libraries. My question is, how I can build 32-bit Boost libraries on the same machine?  Does it take command line variables, such as CXXFLAGS=-m32?


Thanks.
Gehua Yang

Vladimir Prus

unread,
Jul 12, 2008, 4:41:52 AM7/12/08
to boost...@lists.boost.org
Gehua Yang wrote:

There are two approaches:

1. bjam <.....> address-model=32

This might require SVN HEAD.

2. bjam <.....> cxxflags=-m32

Note this will affect C++ compilation only, add "cflags=-m32" to affect C.

- Volodya


_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Richard Hadsell

unread,
Jul 14, 2008, 11:14:18 AM7/14/08
to boost...@lists.boost.org
Vladimir Prus wrote:
There are two approaches:

1. bjam <.....> address-model=32
  
This also requires an architecture option, e.g., 'architecture=x86'.

-- 
Dick Hadsell			914-259-6320  Fax: 914-259-6499
Reply-to:			had...@blueskystudios.com
Blue Sky Studios                http://www.blueskystudios.com
44 South Broadway, White Plains, NY 10601
Reply all
Reply to author
Forward
0 new messages