Boost logo

Boost Users :

Subject: Re: [Boost-users] Using different compilers with boost
From: Dan Smithers (dan_at_[hidden])
Date: 2009-01-26 06:12:53


>> I need to use several compilers for my project for different target
>> computers. I have built boost 1.37 for gcc 4.1.2 and 3.4.3 and
>> everything seems to be nicely set up as
>> <boost_dir>/lib/libboost_xxx-gcc34-mt-1_37.so and
>> <boost_dir>/lib/libboost_xxx-gcc41-mt-1_37.so.
>>
>> Is there anyway of automatically detecting which version to link? I
>> suppose that gcc --version and some sort of awk script could do this.
>>
>
> gcc -dumpversion is more useful for automated processing.
>
> For example,
> gcc -dumpversion | perl -p -e
> 's/(\d)\.(\d)\.\d/-lboost_xxx-gcc$1$2-mt-1_37/'

Thanks Steven, just what I was looking for.

dan


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