ns3,c,尽管被用作’typeid’的操作数,但仍将评估具有副作用的表
发布时间:2020-12-16 07:13:44 所属栏目:百科 来源:网络整理
导读:发生了一些奇怪的事情:我没有修改我的ns3 c代码的任何部分,并且运行编译这是出现的错误: [ 815/1681] cxx: scratch/initial-scenario.cc - build/scratch/initial-scenario.cc.1.oIn file included from ../scratch/initial-scenario.cc:3:In file include
发生了一些奇怪的事情:我没有修改我的ns3 c代码的任何部分,并且运行编译这是出现的错误:
[ 815/1681] cxx: scratch/initial-scenario.cc -> build/scratch/initial-scenario.cc.1.o In file included from ../scratch/initial-scenario.cc:3: In file included from ./ns3/core-module.h:18: In file included from ./ns3/calendar-scheduler.h:24: In file included from ./ns3/scheduler.h:25: In file included from ./ns3/object.h:29: In file included from ./ns3/object-base.h:23: In file included from ./ns3/type-id.h:25: In file included from ./ns3/trace-source-accessor.h:24: ./ns3/callback.h:1244:54: error: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Werror,-Wpotentially-evaluated-expression] "got=" << Demangle ( typeid (*other).name () ) << std::endl << ^ ./ns3/fatal-error.h:98:32: note: expanded from macro 'NS_FATAL_ERROR' std::cerr << "msg="" << msg << "","; ^ 1 error generated. 我不明白为什么会出现这个错误.奇怪的是,我在两个不同的目录中使用两个相似的代码,错误出现在两者中,但我没有修改任何东西.可能是编译器的问题?有什么建议吗? 解决方法
我按照此处的建议解决了问题:
https://www.nsnam.org/wiki/Ns-3.24-errata
该问题与Xcode 7.0的更新有关 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |