• 注册
欢迎加入behaviac Q&A网站。behaviac是腾讯开源组件https://github.com/TencentOpen/behaviac 官方网站:http://www.behaviac.com/,提供各种文档和教程及手册 为了您及时的获得您最新问题的评论或者回答,请提供并验证您的邮箱
欢迎来到 behaviac Q&A。 您在bbs里的问题,管理员会当下就收到通知,不要担心管理员看不到您的问题。也请在bbs里提供您的email,这样就可以第一时间收到关于回答,评论的email的通知了。 为了节省大家的时间,请表达好你的问题,提供必要上下文,版本号,平台信息,重现步骤等。

linux下编译报错,libs/behaviac/base/core/types.h:164:23: 错误:调用重载的‘isnan(behaviac::Float64&)’有歧义,看起来是跟std的insane函数冲突,怎么解决呀

0 喜欢 0 不喜欢
371 浏览

linux下编译报错,libs/behaviac/base/core/types.h:164:23: 错误:调用重载的‘isnan(behaviac::Float64&)’有歧义,看起来是跟std的isnan函数冲突,怎么解决呀,

完整编译错误如下,

In file included from libs/behaviac/base/core/assert_t.h:19:0,

                 from libs/behaviac/base/base.h:19,

                 from libs/behaviac/behaviac.h:17,

                 from src/servers/Scene/ai/CreatureAi.h:12,

                 from src/servers/Scene/world/Creature.cpp:12:

libs/behaviac/base/core/types.h: 在函数‘int behaviac::_isnan(behaviac::Float64)’中:

libs/behaviac/base/core/types.h:164:23: 错误:调用重载的‘isnan(behaviac::Float64&)’有歧义

         return isnan(x);

                       ^

libs/behaviac/base/core/types.h:164:23: 附注:备选是:

In file included from /usr/include/features.h:375:0,

                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,

                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,

                 from /usr/include/c++/4.8.2/bits/stl_algobase.h:59,

                 from /usr/include/c++/4.8.2/list:60,

                 from src/servers/Scene/world/Entity.h:12,

                 from src/servers/Scene/world/Creature.h:12,

                 from src/servers/Scene/world/Creature.cpp:9:

/usr/include/bits/mathcalls.h:235:1: 附注:int isnan(double)

 __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));

 ^

In file included from /usr/include/c++/4.8.2/random:38:0,

                 from /usr/include/c++/4.8.2/bits/stl_algo.h:65,

                 from /usr/include/c++/4.8.2/algorithm:62,

                 from /usr/local/include/ace/Intrusive_List.inl:5,

                 from /usr/local/include/ace/Intrusive_List.h:128,

                 from /usr/local/include/ace/Cleanup.h:30,

                 from /usr/local/include/ace/Object_Manager_Base.h:28,

                 from /usr/local/include/ace/OS_NS_stdlib.inl:6,

                 from /usr/local/include/ace/OS_NS_stdlib.h:449,

                 from /usr/local/include/ace/OS_Memory.h:337,

                 from /usr/local/include/ace/OS_NS_unistd.inl:11,

                 from /usr/local/include/ace/OS_NS_unistd.h:371,

                 from /usr/local/include/ace/Log_Msg.inl:6,

                 from /usr/local/include/ace/Log_Msg.h:751,

                 from src/lib/common/Log.h:12,

                 from src/lib/common/Common.h:13,

                 from src/servers/Scene/world/Entity.h:14,

                 from src/servers/Scene/world/Creature.h:12,

                 from src/servers/Scene/world/Creature.cpp:9:

/usr/include/c++/4.8.2/cmath:626:3: 附注:constexpr bool std::isnan(long double)

   isnan(long double __x)

   ^

/usr/include/c++/4.8.2/cmath:622:3: 附注:constexpr bool std::isnan(double)

   isnan(double __x)

   ^

/usr/include/c++/4.8.2/cmath:618:3: 附注:constexpr bool std::isnan(float)

   isnan(float __x)

   ^

make: *** [Scene_Objs/servers/Scene/world/Creature.o] 错误 1

最新提问 4月 8, 2016 用户: qq_570762bf0f5de (450 分)
标签修改 5月 4, 2016 用户:jonygli

1个回答

0 喜欢 0 不喜欢
你本地先把base/core/types.h文件里面的_isnan的函数删掉吧,我们在下一个版本会删掉
最新回答 4月 11, 2016 用户: cainhuang (33,810 分)
...