AMDG On 12/11/2013 11:25 AM, Ted Byers wrote:
On my OpenSuse box, version 12.3, the default version of gcc is 4.7. I just successfully built gcc 4.8.2, with the binary names ending with 48 (so I have gcc48, g++48, &c.). So, I have two versions of gcc on this machine, and I believe I can use either by setting CC to the one or the other in my make files.
Hence my problem. I have built boost 1.55.0 on my Ubuntu 12.04 box (but with the default names, so that gcc -v tells me that I am using gcc 4.8.2: the default version of gcc on that version of Ubuntu is 4.6, which is too old for me to consider). So, a basic build of the boost libraries is simple, and something I have done before. But I do not know how to build boost twice, once with gcc 4.7 and once with gcc 4.8.2, and have them installed in such a way as to ensure that the two builds do not clash and so that if I set CC to the one or the other version of gcc, the right build of boost will automagically be selected (it would be appreciated if someone who knows Gnu make better than I do could show me how to effect that in my makefiles). Obviously I am assuming that a single build of boost will not work with both compilers (is that assumption correct?).
It's possible that it would work, but I wouldn't count on it. We don't do anything to ensure it.
Unfortunately, I have not yet found anything in the documentation that talks about building boost with different versions of a given toolset on the same machine.
The only problem is that the final libraries have the same name. You can either use --layout=tagged or --layout=versioned to include the toolset in the library name, or you can use --stagedir=xxx to install the libraries into two different directories. In Christ, Steven Watanabe