BCB6 编译boost_1_46_1
我的方法是在D:\jackie\Boost\boost_1_46_1\libs\regex\build直接运行命令make -f bcb6.mak,编译不成功出现了很多错误:
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
bcc32 @MAKE0000.@@@
Borland C++ 5.6 for Win32 Copyright (c) 1993, 2002 Borland
../src/c_regex_traits.cpp:
bcc32 @MAKE0001.@@@
Borland C++ 5.6 for Win32 Copyright (c) 1993, 2002 Borland
../src/cpp_regex_traits.cpp:
bcc32 @MAKE0002.@@@
Borland C++ 5.6 for Win32 Copyright (c) 1993, 2002 Borland
../src/cregex.cpp:
Error E2209 ../../../boost/functional/hash/hash.hpp 28: Unable to open include f
ile 'typeindex'
Error E2316 ../../../boost/functional/hash/hash.hpp 68: 'long_long_type' is not
a member of 'boost'
Error E2356 ../../../boost/functional/hash/hash.hpp 68: Type mismatch in redecla
ration of 'boost::hash_value(bool)'
Error E2344 ../../../boost/functional/hash/hash.hpp 52: Earlier declaration of '
boost::hash_value(bool)'
Error E2063 ../../../boost/functional/hash/hash.hpp 68: Illegal initialization
Error E2293 ../../../boost/functional/hash/hash.hpp 68: ) expected
Error E2316 ../../../boost/functional/hash/hash.hpp 69: 'ulong_long_type' is not
a member of 'boost'
Error E2238 ../../../boost/functional/hash/hash.hpp 69: Multiple declaration for
'boost::hash_value(bool)'
Error E2344 ../../../boost/functional/hash/hash.hpp 68: Earlier declaration of '
boost::hash_value(bool)'
Error E2063 ../../../boost/functional/hash/hash.hpp 69: Illegal initialization
Error E2293 ../../../boost/functional/hash/hash.hpp 69: ) expected
Error E2316 ../../../boost/functional/hash/hash.hpp 95: 'type_index' is not a me
mber of 'std'
Error E2238 ../../../boost/functional/hash/hash.hpp 95: Multiple declaration for
'boost::hash_value(bool)'
Error E2344 ../../../boost/functional/hash/hash.hpp 69: Earlier declaration of '
boost::hash_value(bool)'
Error E2063 ../../../boost/functional/hash/hash.hpp 95: Illegal initialization
Error E2293 ../../../boost/functional/hash/hash.hpp 95: ) expected
Error E2171 ../../../boost/functional/hash/hash.hpp 145: Body has already been d
efined for function 'boost::hash_value(bool)'
Error E2451 ../../../boost/functional/hash/hash.hpp 146: Undefined symbol 'v' in
function boost::hash_value(bool)
Error E2316 ../../../boost/functional/hash/hash.hpp 202: 'long_long_type' is not
a member of 'boost'
Error E2092 ../../../boost/functional/hash/hash.hpp 202: Storage class 'inline'
is not allowed here
Error E2445 ../../../boost/functional/hash/hash.hpp 202: Variable 'hash_value' i
s initialized more than once
Error E2063 ../../../boost/functional/hash/hash.hpp 202: Illegal initialization
Error E2293 ../../../boost/functional/hash/hash.hpp 202: ) expected
Error E2316 ../../../boost/functional/hash/hash.hpp 449: 'long_long_type' is not
a member of 'boost'
Error E2299 ../../../boost/functional/hash/hash.hpp 449: Cannot generate templat
e specialization from 'hash<T>'
Error E2228 ../../../boost/functional/hash/hash.hpp 449: Too many error or warni
ng messages
*** 26 errors in Compile ***
** error 1 ** deleting bcb\libboost_regex-bcb-s-1_46\cregex.obj
[解决办法]
你可以看一下,boost的编译手册.
我记得functional这个模板库如果用在bcb6.0和vc6.0下需要老的兼容写法.
regex可能用到了新的写法.
需要带动的文件是config.hpp,也就是改一些预编译命令.
具体改什么我不清楚,我用到的只是boost中一些不需要编译的模板库而已.
如果lz需要的只是要正则表达式解析库,网上也有其它的c写的正则库(开源的).