首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法编译

无法编译
EN

Stack Overflow用户
提问于 2014-09-19 23:11:04
回答 1查看 3.4K关注 0票数 1

我正在使用Ubuntu 12.04和gcc 4.8,我的gfortran刚刚更新到4.8,有些我无法编译它,以下是错误:

代码语言:javascript
复制
In file included from /home/rtbkit/local/include/boost/tuple/tuple.hpp:33:0,
             from ./jml/boosting/tools/boosting_tool_common.h:16,
             from ./jml/boosting/tools/boosting_tool_common.cc:10:
 /home/rtbkit/local/include/boost/tuple/detail/tuple_basic.hpp: In function 'typename    boost::tuples::access_traits<typename boost::tuples::element<N, boost::tuples::cons<HT, TT> >::type>::const_type boost::tuples::get(const boost::tuples::cons<HT, TT>&)':
 /home/rtbkit/local/include/boost/tuple/detail/tuple_basic.hpp:228:31: error: typedef 'cons_element' locally defined but not used [-Werror=unused-local-typedefs]
typedef BOOST_DEDUCED_TYPENAME impl::type cons_element;
                                          ^
In file included from /home/rtbkit/local/include/boost/multi_array/concept_checks.hpp:21:0,
             from /home/rtbkit/local/include/boost/multi_array/base.hpp:28,
             from /home/rtbkit/local/include/boost/multi_array.hpp:21,
             from ./jml/boosting/classifier.h:20,
             from ./jml/boosting/tools/boosting_tool_common.cc:14:
 /home/rtbkit/local/include/boost/concept_check.hpp: In function 'void boost::function_requires (Model*)':
/home/rtbkit/local/include/boost/concept_check.hpp:45:113: error: typedef 'boost_concept_check45' locally defined but not used [-Werror=unused-local-typedefs]
   BOOST_CONCEPT_ASSERT((Model));

 ^
   typedef typename Array::index_range index_range;
                                       ^
/home/rtbkit/local/include/boost/multi_array/concept_checks.hpp:43:37: error: typedef 'index' locally defined but not used [-Werror=unused-local-typedefs]
   typedef typename Array::index index;
                                 ^
/home/rtbkit/local/include/boost/multi_array/concept_checks.hpp: In static member function 'static void boost::multi_array_concepts::detail::idgen_helper<0ul>::call(Array&, const IdxGen&, Call_Type)':
                                         ^
   In file included from /home/rtbkit/local/include/boost/regex/v4/regex.hpp:79:0,
             from /home/rtbkit/local/include/boost/regex.hpp:31,
             from ./jml/boosting/tools/boosting_tool_common.cc:18:
/home/rtbkit/local/include/boost/regex/v4/regex_format.hpp: In member function 'OutputIter boost::re_detail::format_functor_c_string<charT, Match, Traits>::operator()(const Match&,  , boost::regex_constants::match_flag_type, const Traits&)':

/home/rtbkit/local/include/boost/regex/v4/regex_format.hpp:1086:41: error: typedef 'char_type'   locally defined but not used [-Werror=unused-local-typedefs]
   typedef typename Match::char_type char_type;
                                     ^
In file included from /home/rtbkit/local/include/boost/regex/v4/regex.hpp:166:0,
             from /home/rtbkit/local/include/boost/regex.hpp:31,
             from ./jml/boosting/tools/boosting_tool_common.cc:18:
/home/rtbkit/local/include/boost/regex/v4/regex_split.hpp: In function 'std::size_t boost::regex_split(OutputIterator, std::basic_string<charT, Traits1, Alloc1>&, const boost::basic_regex<charT, Traits2>&, boost::regex_constants::match_flag_type, std::size_t)':
/home/rtbkit/local/include/boost/regex/v4/regex_split.hpp:110:57: error: typedef 'match_allocator' locally defined but not used [-Werror=unused-local-typedefs]
typedef typename match_results<ci_t>::allocator_type                        match_allocator;
                                                     ^
cc1plus: all warnings being treated as errors
make: ***     [build/x86_64/obj/jml/boosting/tools/boosting_tool_common.3ec7a8f7cea9a8b0de95729f9e9210cd.lo] Error 1

我的图书馆怎么了?我检查了gfortran的版本是4.8。

EN

回答 1

Stack Overflow用户

发布于 2014-09-25 12:13:57

使用GCC 4.8编译rtbkit时会发生此错误。

终于为我工作了:

代码语言:javascript
复制
nano /home/rtbkit/rtbkit/Makefile

将编译器标志-Wno-unused-local-typedefs添加到CXXFLAGS

代码语言:javascript
复制
CXXFLAGS += -Wno-unused-local-typedefs -Wno-deprecated ...
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25943602

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档