2012-12-19 61 views
1

我一直在升級一個已經工作的項目,這個項目取決於升壓1.43來升壓1.52。編譯時,我在數學特殊函數頭文件中收到一組奇怪的錯誤。不幸的是,我無法從下面的輸出中找出引起它的代碼。數學錯誤似乎不知從哪裏冒出來,因爲DisplayWindow.hDisplayWindow.cpp不使用這些數學函數。編譯器是Linux上的gcc 4.1.2。升壓1.51也會發生同樣的情況。有誰知道什麼可能導致這個問題?升壓數學TR1使用升壓時的特殊功能編譯錯誤

我不確定它是否重要 - 我使用升壓作爲TRI1插入描述超過here

In file included from /home/p/plau/include/boost/fusion/tuple/tuple.hpp:22, 
      from /home/p/plau/include/boost/fusion/tuple.hpp:10, 
      from /home/p/plau/include/boost/fusion/include/tuple.hpp:10, 
      from /home/p/plau/include/boost/tr1/tuple.hpp:58, 
      from /home/p/plau/include/boost/tr1/utility.hpp:117, 
      from /home/p/plau/include/boost/tr1/tr1/utility:38, 
      from /home/p/plau/include/boost/serialization/nvp.hpp:19, 
      from /home/p/plau/include/boost/bimap/bimap.hpp:57, 
      from /home/p/plau/include/boost/bimap.hpp:13, 
      from /home/p/plau/include/rlearn/Action.h:13, 
      from /home/p/plau/include/rlearn/EnvWrapper.h:5, 
      from ./rlsiva/DisplayWindow.h:9, 
      from src/DisplayWindow.cpp:1: 
/home/p/plau/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file 
/home/p/plau/include/boost/math/special_functions/trunc.hpp: In function T boost::math::trunc(const T&, const Policy&): 
/home/p/plau/include/boost/math/special_functions/trunc.hpp:24: error: raise_rounding_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/trunc.hpp: In function int boost::math::itrunc(const T&, const Policy&): 
/home/p/plau/include/boost/math/special_functions/trunc.hpp:47: error: raise_rounding_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/trunc.hpp: In function long int boost::math::ltrunc(const T&, const Policy&): 
/home/p/plau/include/boost/math/special_functions/trunc.hpp:62: error: raise_rounding_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/trunc.hpp: In function boost::long_long_type boost::math::lltrunc(const T&, const Policy&): 
/home/p/plau/include/boost/math/special_functions/trunc.hpp:79: error: raise_rounding_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<0>&): 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:82: error: raise_domain_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:82: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:85: error: raise_overflow_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:85: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:103: error: check_series_iterations is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:103: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<53>&): 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:115: error: raise_domain_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:115: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:118: error: raise_overflow_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:118: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<64>&): 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:168: error: raise_domain_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:168: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:171: error: raise_overflow_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:171: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<24>&): 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:223: error: raise_domain_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:223: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:226: error: raise_overflow_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:226: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function typename boost::math::tools::promote_args<T, float, float, float, float, float>::type boost::math::log1p(T, const Policy&): 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:320: error: checked_narrowing_cast is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:320: error: expected primary-expression before , token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:320: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function float boost::math::log1p(float, const Policy&): 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:355: error: raise_domain_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:355: error: expected primary-expression before float 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:355: error: expected ; before float 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:355: error: expected unqualified-id before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:358: error: raise_overflow_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:358: error: expected primary-expression before float 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:358: error: expected ; before float 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:358: error: expected unqualified-id before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function long double boost::math::log1p(long double, const Policy&): 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:367: error: raise_domain_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:367: error: expected primary-expression before long 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:367: error: expected ; before long 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:367: error: expected unqualified-id before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:370: error: raise_overflow_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:370: error: expected primary-expression before long 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:370: error: expected ; before long 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:370: error: expected unqualified-id before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function double boost::math::log1p(double, const Policy&): 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:392: error: raise_domain_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:392: error: expected primary-expression before double 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:392: error: expected ; before double 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:392: error: expected unqualified-id before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:395: error: raise_overflow_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:395: error: expected primary-expression before double 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:395: error: expected ; before double 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:395: error: expected unqualified-id before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp: In function typename boost::math::tools::promote_args<T, float, float, float, float, float>::type boost::math::log1pmx(T, const Policy&): 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:465: error: raise_domain_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:465: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:468: error: raise_overflow_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:468: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:487: error: check_series_iterations is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/log1p.hpp:487: error: expected primary-expression before > token 
/home/p/plau/include/boost/math/special_functions/hypot.hpp: In function T boost::math::detail::hypot_imp(T, T, const Policy&): 
/home/p/plau/include/boost/math/special_functions/hypot.hpp:45: error: raise_overflow_error is not a member of boost::math::policies 
/home/p/plau/include/boost/math/special_functions/hypot.hpp:45: error: expected primary-expression before > token 
make: *** [../../objs/rlsiva/release/DisplayWindow.o] Error 1 
make: Leaving directory `/home/p/plau/retina/project/components/rlsiva' 

UPDATE:試圖在Windows上編譯相同的代碼使用MinGW-GCC 4.7和1.52提振給出了下面的輸出。

In file included from e:/code/boost_1_52_0/boost/math/constants/calculate_constants.hpp:11:0, 
       from e:/code/boost_1_52_0/boost/math/constants/constants.hpp:288, 
       from e:/code/boost_1_52_0/boost/math/complex/details.hpp:22, 
       from e:/code/boost_1_52_0/boost/math/complex/asin.hpp:9, 
       from e:/code/boost_1_52_0/boost/math/complex.hpp:10, 
       from e:/code/boost_1_52_0/boost/tr1/complex.hpp:13, 
       from e:/code/boost_1_52_0/boost/tr1/tr1/complex:28, 
       from e:/code/boost_1_52_0/boost/math/policies/error_handling.hpp:15, 
       from e:/code/boost_1_52_0/boost/math/special_functions/gamma.hpp:32, 
       from e:/code/boost_1_52_0/boost/math/special_functions/detail/bessel_jy.hpp:14, 
       from e:/code/boost_1_52_0/boost/math/special_functions/bessel.hpp:17, 
       from e:/code/boost_1_52_0/boost/math/special_functions/airy.hpp:10, 
       from e:/code/boost_1_52_0/boost/math/special_functions.hpp:15, 
       from e:/code/boost_1_52_0/boost/random/generate_canonical.hpp:22, 
       from e:/code/boost_1_52_0/boost/random.hpp:52, 
       from e:/games/rlearn/rlearn/Random.h:4, 
       from e:/games/rlearn/rlearn/Comparators.h:4, 
       from e:/games/rlearn/rlearn/function/StoredActionFunction.h:5, 
       from e:/games/rlearn/rlearn/ValueFunction.h:18, 
       from e:/games/rlearn/rlearn/Extractor.h:8, 
       from e:/games/rlearn/rlearn/DataStructures.h:7, 
       from ./rlsiva/SivaController.h:5, 
       from src/DisplayWindow.cpp:3: 
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp: In function 'T boost::math::trunc(const T&, const Policy&)': 
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp:24:14: error: 'raise_rounding_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp: In function 'int boost::math::itrunc(const T&, const Policy&)': 
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp:47:31: error: 'raise_rounding_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp: In function 'long int boost::math::ltrunc(const T&, const Policy&)': 
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp:62:32: error: 'raise_rounding_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp: In function 'boost::long_long_type boost::math::lltrunc(const T&, const Policy&)': 
e:/code/boost_1_52_0/boost/math/special_functions/trunc.hpp:79:49: error: 'raise_rounding_error' is not a member of 'boost::math::policies' 
In file included from e:/code/boost_1_52_0/boost/math/complex/asin.hpp:12:0, 
       from e:/code/boost_1_52_0/boost/math/complex.hpp:10, 
       from e:/code/boost_1_52_0/boost/tr1/complex.hpp:13, 
       from e:/code/boost_1_52_0/boost/tr1/tr1/complex:28, 
       from e:/code/boost_1_52_0/boost/math/policies/error_handling.hpp:15, 
       from e:/code/boost_1_52_0/boost/math/special_functions/gamma.hpp:32, 
       from e:/code/boost_1_52_0/boost/math/special_functions/detail/bessel_jy.hpp:14, 
       from e:/code/boost_1_52_0/boost/math/special_functions/bessel.hpp:17, 
       from e:/code/boost_1_52_0/boost/math/special_functions/airy.hpp:10, 
       from e:/code/boost_1_52_0/boost/math/special_functions.hpp:15, 
       from e:/code/boost_1_52_0/boost/random/generate_canonical.hpp:22, 
       from e:/code/boost_1_52_0/boost/random.hpp:52, 
       from e:/games/rlearn/rlearn/Random.h:4, 
       from e:/games/rlearn/rlearn/Comparators.h:4, 
       from e:/games/rlearn/rlearn/function/StoredActionFunction.h:5, 
       from e:/games/rlearn/rlearn/ValueFunction.h:18, 
       from e:/games/rlearn/rlearn/Extractor.h:8, 
       from e:/games/rlearn/rlearn/DataStructures.h:7, 
       from ./rlsiva/SivaController.h:5, 
       from src/DisplayWindow.cpp:3: 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<0>&)': 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:82:14: error: 'raise_domain_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:82:44: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:85:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:85:47: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:103:4: error: 'check_series_iterations' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:103:39: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<53>&)': 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:115:14: error: 'raise_domain_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:115:44: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:118:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:118:47: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<64>&)': 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:168:14: error: 'raise_domain_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:168:44: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:171:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:171:47: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'T boost::math::detail::log1p_imp(const T&, const Policy&, const mpl_::int_<24>&)': 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:223:14: error: 'raise_domain_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:223:44: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:226:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:226:47: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'typename boost::math::tools::promote_args<RT>::type boost::math::log1p(T, const Policy&)': 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:320:11: error: 'checked_narrowing_cast' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:320:55: error: expected primary-expression before ',' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:320:74: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'float boost::math::log1p(float, const Policy&)': 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:355:14: error: 'raise_domain_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:355:43: error: expected primary-expression before 'float' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:355:43: error: expected ';' before 'float' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:355:48: error: expected unqualified-id before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:358:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:358:46: error: expected primary-expression before 'float' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:358:46: error: expected ';' before 'float' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:358:51: error: expected unqualified-id before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'long double boost::math::log1p(long double, const Policy&)': 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:367:14: error: 'raise_domain_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:367:43: error: expected primary-expression before 'long' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:367:43: error: expected ';' before 'long' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:367:54: error: expected unqualified-id before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:370:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:370:46: error: expected primary-expression before 'long' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:370:46: error: expected ';' before 'long' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:370:57: error: expected unqualified-id before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'double boost::math::log1p(double, const Policy&)': 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:392:14: error: 'raise_domain_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:392:43: error: expected primary-expression before 'double' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:392:43: error: expected ';' before 'double' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:392:49: error: expected unqualified-id before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:395:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:395:46: error: expected primary-expression before 'double' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:395:46: error: expected ';' before 'double' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:395:52: error: expected unqualified-id before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp: In function 'typename boost::math::tools::promote_args<RT>::type boost::math::log1pmx(T, const Policy&)': 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:465:14: error: 'raise_domain_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:465:44: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:468:15: error: 'raise_overflow_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:468:47: error: expected primary-expression before '>' token 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:487:4: error: 'check_series_iterations' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/log1p.hpp:487:39: error: expected primary-expression before '>' token 
In file included from e:/code/boost_1_52_0/boost/math/complex/fabs.hpp:10:0, 
       from e:/code/boost_1_52_0/boost/math/complex.hpp:28, 
       from e:/code/boost_1_52_0/boost/tr1/complex.hpp:13, 
       from e:/code/boost_1_52_0/boost/tr1/tr1/complex:28, 
       from e:/code/boost_1_52_0/boost/math/policies/error_handling.hpp:15, 
       from e:/code/boost_1_52_0/boost/math/special_functions/gamma.hpp:32, 
       from e:/code/boost_1_52_0/boost/math/special_functions/detail/bessel_jy.hpp:14, 
       from e:/code/boost_1_52_0/boost/math/special_functions/bessel.hpp:17, 
       from e:/code/boost_1_52_0/boost/math/special_functions/airy.hpp:10, 
       from e:/code/boost_1_52_0/boost/math/special_functions.hpp:15, 
       from e:/code/boost_1_52_0/boost/random/generate_canonical.hpp:22, 
       from e:/code/boost_1_52_0/boost/random.hpp:52, 
       from e:/games/rlearn/rlearn/Random.h:4, 
       from e:/games/rlearn/rlearn/Comparators.h:4, 
       from e:/games/rlearn/rlearn/function/StoredActionFunction.h:5, 
       from e:/games/rlearn/rlearn/ValueFunction.h:18, 
       from e:/games/rlearn/rlearn/Extractor.h:8, 
       from e:/games/rlearn/rlearn/DataStructures.h:7, 
       from ./rlsiva/SivaController.h:5, 
       from src/DisplayWindow.cpp:3: 
e:/code/boost_1_52_0/boost/math/special_functions/hypot.hpp: In function 'T boost::math::detail::hypot_imp(T, T, const Policy&)': 
e:/code/boost_1_52_0/boost/math/special_functions/hypot.hpp:45:14: error: 'raise_overflow_error' is not a member of 'boost::math::policies' 
e:/code/boost_1_52_0/boost/math/special_functions/hypot.hpp:45:46: error: expected primary-expression before '>' token 
make: *** [../../objs/rlsiva/release/DisplayWindow.o] Error 1 
make: Leaving directory `/e/retina/project/components/rlsiva' 

UPDATE2:相同的代碼使用VC的TR1支持編譯罰款在Windows上VC10。

+0

這可能很容易造成在一個類或結構的定義的末尾缺少分號或文件中缺少paranthesis。 –

+0

我正在升級已在運行的項目。該程序與以前的升壓1.43編譯罰款,唯一改變的是升壓庫到1.52 – devil

+0

GCC 4.1.2於2007年2月13日發佈。這是非常古老的! –

回答

0

我看到同樣類型的我們的代碼中的錯誤信息,並能與這個例子中重現出來:

#include<boost/random.hpp> 
#include<iostream> 
int main(){ 
    boost::random::mt19937 ranGen(std::time(0)); 
    boost::uniform_int<> dist(1, 50); 
    std::cout << dist(randGen) << std::endl; 
    return 0; 
} 

與同TR1投遞方法編譯時:使用

g++ tst.cpp -I/path/to/boost/include/boost/tr1/tr1 -I/path/to/boost/include 

boost 1.52.0和gcc 4.4.6。

在我們的例子中,boost/random.hpp涵蓋了我們需要的功能,但也包括其他標題,最終導致這些奇怪的編譯器錯誤。

我們可以通過更換

#include<boost/random.hpp> 

,更具體的我們的需要來解決此問題:

#include<boost/random/mersenne_twister.hpp> 
#include<boost/random/uniform_int.hpp> 
#include<ctime> 

因此留下了有問題的頭。

您可以使用相同類型的解決方法來使用random.hppbimap.hpp