[RESOLVED] Compilation error: tod_manager.cpp
Moderator: Forum Moderators
[RESOLVED] Compilation error: tod_manager.cpp
Hi,
I've been trying to compile the sources from the github repo using scons and the instructions on compiling wesnoth from the wiki, and hit this error :
Is this a known bug or something to do with how I compile the files ?
I've been trying to compile the sources from the github repo using scons and the instructions on compiling wesnoth from the wiki, and hit this error :
Code: Select all
In file included from /usr/include/boost/range/adaptor/filtered.hpp:15:0,
from /usr/include/boost/range/adaptors.hpp:17,
from src/tod_manager.cpp:30:
/usr/include/boost/range/detail/default_constructible_unary_fn.hpp: In instantiation of ‘R boost::range_detail::default_constructible_unary_fn_wrapper<F, R>::operator()(const Arg&) const [with Arg = int; F = greater<int>; R = bool]’:
/usr/include/boost/iterator/filter_iterator.hpp:100:49: required from ‘void boost::filter_iterator<Predicate, Iterator>::satisfy_predicate() [with Predicate = boost::range_detail::default_constructible_unary_fn_wrapper<greater<int>, bool>; Iterator = boost::transform_iterator<boost::range_detail::default_constructible_unary_fn_wrapper<boost::_bi::bind_t<int, int (*)(std::basic_string<char>, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >, int>, __gnu_cxx::__normal_iterator<const std::basic_string<char>*, std::vector<std::basic_string<char> > >, boost::use_default, boost::use_default>]’
/usr/include/boost/iterator/filter_iterator.hpp:59:29: required from ‘boost::filter_iterator<Predicate, Iterator>::filter_iterator(Predicate, Iterator, Iterator) [with Predicate = boost::range_detail::default_constructible_unary_fn_wrapper<greater<int>, bool>; Iterator = boost::transform_iterator<boost::range_detail::default_constructible_unary_fn_wrapper<boost::_bi::bind_t<int, int (*)(std::basic_string<char>, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >, int>, __gnu_cxx::__normal_iterator<const std::basic_string<char>*, std::vector<std::basic_string<char> > >, boost::use_default, boost::use_default>]’
/usr/include/boost/iterator/filter_iterator.hpp:114:57: required from ‘boost::filter_iterator<Predicate, Iterator> boost::make_filter_iterator(Predicate, Iterator, Iterator) [with Predicate = boost::range_detail::default_constructible_unary_fn_wrapper<greater<int>, bool>; Iterator = boost::transform_iterator<boost::range_detail::default_constructible_unary_fn_wrapper<boost::_bi::bind_t<int, int (*)(std::basic_string<char>, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >, int>, __gnu_cxx::__normal_iterator<const std::basic_string<char>*, std::vector<std::basic_string<char> > >, boost::use_default, boost::use_default>]’
/usr/include/boost/range/adaptor/filtered.hpp:46:71: required from ‘boost::range_detail::filtered_range<P, R>::filtered_range(P, R&) [with P = greater<int>; R = const boost::range_detail::transformed_range<boost::_bi::bind_t<int, int (*)(std::basic_string<char>, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >, const std::vector<std::basic_string<char> > >]’
/usr/include/boost/range/adaptor/filtered.hpp:75:76: required from ‘boost::range_detail::filtered_range<Predicate, const ForwardRange> boost::range_detail::operator|(const ForwardRange&, const boost::range_detail::filter_holder<Predicate>&) [with ForwardRange = boost::range_detail::transformed_range<boost::_bi::bind_t<int, int (*)(std::basic_string<char>, int), boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >, const std::vector<std::basic_string<char> > >; Predicate = greater<int>]’
src/tod_manager.cpp:94:46: required from here
/usr/include/boost/range/detail/default_constructible_unary_fn.hpp:39:17: erreur: passing ‘const greater<int>’ as ‘this’ argument of ‘bool greater<T>::operator()(T) [with T = int]’ discards qualifiers [-fpermissive]
return (*m_impl)(arg);
^
scons: *** [build/debug/tod_manager.o] Error 1
scons: building terminated because of errors.
Last edited by eldruz on October 10th, 2014, 9:10 pm, edited 1 time in total.
Re: Compilation error: tod_manager.cpp
no this is not a known bug.
which boost version do you use
which compiler + version do you use ?
EDIT: possible fix in https://github.com/wesnoth/wesnoth/comm ... e752a321dd
which boost version do you use
which compiler + version do you use ?
EDIT: possible fix in https://github.com/wesnoth/wesnoth/comm ... e752a321dd
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Compilation error: tod_manager.cpp
boost 1.56.0-1
gcc 4.9.1-2
The fix you suggested resolved the issue, the game compiles and runs just fine. Thanks mate.
gcc 4.9.1-2
The fix you suggested resolved the issue, the game compiles and runs just fine. Thanks mate.