boost 库最新版本1.34.1,在windows平台下对VC7.1(vs2003)和VC8(vs2005)支持比较好,但对vc6支持比较差。由于各平台差异,boost可能经常存在编译不能通过的现象。另外boost采用jam来编译,也为boost推广设置了障碍。所以近来感觉boost已经冷下去了。boost的开发者在VC6出编译问题时不是去解决问题,而是直接推荐采用vc8。
例如,其入门教程里面的例子,在VC8中编译一次通过,而在VC6中竟引起编译器错误:
#include
<
boost
/
lambda
/
lambda.hpp
>
#include < iostream >
#include < iterator >
#include < algorithm >
int main()
... {
using namespace boost::lambda;
typedef std::istream_iterator<int> in;
std::for_each(
in(std::cin), in(), std::cout << (_1 * 3) << " " );
}
#include < iostream >
#include < iterator >
#include < algorithm >
int main()
... {
using namespace boost::lambda;
typedef std::istream_iterator<int> in;
std::for_each(
in(std::cin), in(), std::cout << (_1 * 3) << " " );
}
在VC6中编译,出如下错误:
Compiling
...
testboost . cpp
d:/ program files/ boost/ boost_1_34_1/ boost/ lambda/ detail/ lambda_fwd . hpp ( 26 ) : fatal error C1001: INTERNAL COMPILER ERROR
( compiler file 'msc1 . cpp' , line 1794 )
Please choose the Technical Support command on the Visual C ++
Help menu , or open the Technical Support help file for more information
Error executing cl . exe .
testboost . exe - 1 error ( s ), 0 warning ( s )
testboost . cpp
d:/ program files/ boost/ boost_1_34_1/ boost/ lambda/ detail/ lambda_fwd . hpp ( 26 ) : fatal error C1001: INTERNAL COMPILER ERROR
( compiler file 'msc1 . cpp' , line 1794 )
Please choose the Technical Support command on the Visual C ++
Help menu , or open the Technical Support help file for more information
Error executing cl . exe .
testboost . exe - 1 error ( s ), 0 warning ( s )
网上面没有真正解决了这个问题的。
网上找到一篇测试报告,对boost 1.340各toolset在各环境下进行了测试,最上面是平台,第二行是测试者,第三行是测试时间,第四行是测试编译器。原文地址:http://engineering.meta-comm.com/boost-regression/1_34_0/user/summary_release.html
Summary: 1.34.0 Release
Report Time: Mon, 14 May 2007 23:41:53 +0000
Unusable: 4302 | Regressions: 0 | New failures: 0
Darwin | Linux | OSF1 | SunOS | Windows | |||||||||||||||||||||||||||||
OSL-V2 | Martin Wille V2 | Martin Wille x86_64 V2 | OSL2-V2 | COMSOFT | Caleb Epstein SunOS-5.10 | OSL4-V2 | Huang-WinXP-x86_32 | JustSoftwareSolutions-debug | metacomm-v2 | RudbekAssociates-V2 | slapeta-V2 | speedsnail-borland-d | speedsnail-gcc-d | speedsnail-msvc-d | speedsnail-msvc-dp | ||||||||||||||||||
i | |||||||||||||||||||||||||||||||||
library / toolset | library / toolset | ||||||||||||||||||||||||||||||||
library / toolset | library / toolset | ||||||||||||||||||||||||||||||||
OSL-V2 | Martin Wille V2 | Martin Wille x86_64 V2 | OSL2-V2 | COMSOFT | Caleb Epstein SunOS-5.10 | OSL4-V2 | Huang-WinXP-x86_32 | JustSoftwareSolutions-debug | metacomm-v2 | RudbekAssociates-V2 | slapeta-V2 | speedsnail-borland-d | speedsnail-gcc-d | speedsnail-msvc-d | speedsnail-msvc-dp | ||||||||||||||||||
i | |||||||||||||||||||||||||||||||||
Darwin | Linux | OSF1 | SunOS | Windows | |||||||||||||||||||||||||||||
algorithm/minmax | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | algorithm/minmax |
algorithm/string | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | unusable | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | unusable | pass | pass | pass | unusable | unusable | algorithm/string |
any | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | pass | any |
array | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | details | pass | array |
assign | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | assign |
bind | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | bind |
concept_check | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | concept_check |
config | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | pass | pass | pass | details | pass | config |
conversion | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | conversion |
crc | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | crc |
date_time | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | details | pass | details | unusable | pass | pass | pass | details | pass | pass | details | details | details | details | unusable | unusable | pass | details | unusable | details | date_time |
disjoint_sets | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | disjoint_sets |
dynamic_bitset | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | pass | pass | pass | details | pass | dynamic_bitset |
filesystem | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | details | details | pass | pass | pass | pass | pass | pass | details | details | details | details | details | details | pass | pass | details | pass | filesystem |
foreach | pass | details | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | details | pass | details | details | pass | pass | pass | pass | details | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | foreach |
format | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | format |
function | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | function |
functional | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | functional |
functional/hash | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | details | pass | pass | details | details | pass | pass | details | pass | functional/hash |
graph | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | unusable | unusable | pass | pass | pass | details | details | pass | unusable | pass | pass | pass | unusable | details | pass | details | unusable | details | graph |
integer | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | integer |
io | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | pass | pass | pass | details | pass | io |
iostreams | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | details | details | pass | pass | pass | pass | details | pass | details | details | details | details | details | details | pass | pass | pass | pass | iostreams |
iterator | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | details | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | iterator |
lambda | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | unusable | unusable | pass | pass | pass | pass | pass | pass | unusable | pass | pass | pass | unusable | unusable | pass | pass | unusable | pass | lambda |
logic | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | logic |
math | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | details | pass | pass | details | details | pass | pass | details | details | math |
mpl | pass | pass | pass | pass | pass | details | pass | pass | details | pass | pass | details | details | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | pass | pass | pass | details | pass | mpl |
multi_array | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | unusable | pass | pass | pass | pass | pass | pass | pass | unusable | pass | pass | pass | pass | pass | pass | pass | pass | pass | multi_array |
multi_index | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | unusable | pass | pass | pass | pass | pass | pass | pass | unusable | pass | pass | pass | pass | pass | pass | pass | details | pass | multi_index |
numeric/conversion | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | pass | pass | pass | details | pass | numeric/conversion |
numeric/interval | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | details | pass | details | unusable | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | unusable | unusable | pass | pass | unusable | details | numeric/interval |
numeric/ublas | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | unusable | pass | unusable | unusable | pass | pass | pass | pass | unusable | pass | unusable | pass | pass | pass | unusable | unusable | pass | pass | unusable | unusable | numeric/ublas |
optional | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | optional |
parameter | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | parameter |
pool | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | details | pass | pool |
preprocessor | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | preprocessor |
program_options | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | unusable | pass | pass | pass | pass | pass | pass | pass | details | details | details | unusable | unusable | pass | pass | unusable | pass | program_options |
property_map | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | property_map |
ptr_container | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | details | pass | unusable | unusable | pass | pass | pass | pass | details | pass | unusable | pass | pass | pass | unusable | unusable | pass | pass | unusable | pass | ptr_container |
python | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | unusable | pass | unusable | pass | pass | pass | pass | pass | pass | pass | unusable | pass | pass | pass | pass | pass | pass | pass | pass | pass | python |
random | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | unusable | pass | pass | details | pass | random |
range | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | range |
rational | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | rational |
regex | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | pass | pass | details | details | pass | pass | details | pass | pass | details | details | pass | regex |
serialization | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | details | details | pass | pass | pass | pass | details | pass | details | details | details | details | details | details | pass | pass | details | pass | serialization |
signals | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | signals |
smart_ptr | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | smart_ptr |
spirit | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | unusable | unusable | pass | pass | pass | pass | pass | pass | unusable | pass | pass | pass | unusable | unusable | pass | pass | unusable | pass | spirit |
statechart | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | unusable | pass | unusable | unusable | pass | pass | pass | pass | details | pass | unusable | details | details | details | unusable | unusable | pass | pass | unusable | pass | statechart |
static_assert | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | static_assert |
test | details | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | details | details | pass | pass | pass | pass | details | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | test |
thread | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | pass | details | pass | details | pass | details | details | pass | pass | pass | pass | pass | pass | thread |
timer | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | timer |
tokenizer | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | tokenizer |
tr1 | details | details | details | details | details | details | details | details | details | details | details | details | details | details | details | unusable | details | details | details | details | unusable | details | details | details | details | details | unusable | unusable | details | details | unusable | details | tr1 |
tuple | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | tuple |
type_traits | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | details | pass | details | details | pass | pass | pass | pass | details | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | type_traits |
typeof | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | details | details | unusable | details | pass | pass | pass | details | pass | details | unusable | pass | pass | pass | details | details | pass | details | details | pass | typeof |
utility | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | pass | details | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | utility |
utility/enable_if | pass | details | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | pass | unusable | unusable | pass | pass | pass | pass | pass | pass | unusable | pass | pass | pass | unusable | unusable | pass | pass | unusable | pass | utility/enable_if |
variant | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | details | details | pass | pass | pass | pass | pass | pass | details | pass | pass | pass | details | details | pass | pass | details | pass | variant |
wave | pass | details | pass | pass | pass | pass | pass | pass | pass | details | pass | pass | details | pass | unusable | unusable | pass | pass | pass | pass | details | pass | unusable | pass | pass | pass | unusable | unusable | pass | pass | unusable | pass | wave |
xpressive | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | unusable | pass | unusable | unusable | pass | pass | pass | pass | pass | pass | unusable | pass | pass | pass | unusable | unusable | pass | pass | unusable | pass | xpressive |
| All library's tests pass. | |
| Most of the library's tests pass, but there are some known failures which might affect the library's functionality. Please follow the link to see the detailed report. | |
| Some of the newly added library's tests fail, or some of the library's tests fail on the newly added compiler, or some of the tests fail due to unresearched reasons. Please follow the link to see the detailed report. | |
| There are some regressions in the library comparing to the previous release. Please follow the link to see the detailed report. | |
| The library author marked it as unusable on the particular platform/toolset. Please follow the link to see the detailed report. |
i | An incremental run. |