Boost logo

Boost Users :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-10-19 04:28:39


n.torrey.pines_at_[hidden] wrote:

> I'm dreaming of compiling MinGW, OS X (Intel and PowerPC) and Linux
> x86 versions of my program in one go, perhaps on Linux. The program
> uses little other than several Boost libraries. Is this a possible and
> reliable usage scenario?
>
> This doesn't seem like a particularly original idea, so I'm sure
> others explored it. Are there any how-to's? I couldn't find any.

Several folks did Linux->{various embedded systems} compile, and it
worked. That's good news. The bad news is that Linix->MinGW compile
won't 100% work out of box.

You can do cross-compiling by setting up a user-config.jam, where
you configure gcc toolset, explicitly specifying a command, which
would be like i686-mingw32-g++, or some such. I think the compilation
will even work. The problem is that you'll end up with libraries named
.a and .so and executables named without any suffix. This is because while
Boost.Build has <target-os> feature, the code that determines file
extension looks at host os, not target-os. It's not hard to fix,
but it need somebody to do that. Patches welcome :-)

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net