Boost logo

Boost-Build :

Subject: [Boost-build] [cygwin] How to use both gcc 3.x.x and gcc 4.x.x
From: Beman Dawes (bdawes_at_[hidden])
Date: 2009-02-19 11:58:54

Cygwin ships both GCC's 3.x.x and 4.x.x series of compilers. You have to
separately install both with the Cygwin installer. The 4.x.x series is
named "gcc4-core" and "gcc4-c++", and they appear lower down in the list
of packages so are easy to miss.

To use both with Boost.Build, your user-config.jam file needs to include:

     using gcc ;
     using gcc : 4 : g++-4 ;

It took some experimentation to get that exactly right;
specifying "using gcc : 4 : gcc-4 ;" resulted in the linker not finding
the standard library lib files, while specifying a full path to g++-4
resulted in the compiler not finding the standard library include files.

After changing user-config.jam, the command:

     bjam --toolset=gcc,gcc-4

successfully built a boost library for both gcc 3.x.x and 4.x.x compilers.

I'm posting this in the hopes it may help others, and also in case some
of the Boost.Build experts have comments or suggestions.



Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at