EOS 编译错误: use of undeclared identifier 'f64_negative_infinity'

yufei       6 年 前       1695

昨天说到,当编译 EOSIO v1.5.0 的时候会报错

In file included from /Users/yufei/Downloads/eos/libraries/chain/controller.cpp:12:
/Users/yufei/Downloads/eos/libraries/chain/include/eosio/chain/contract_table_objects.hpp:200:17: error: use of undeclared identifier 'f64_negative_infinity'
         return f64_negative_infinity();
                ^
/Users/yufei/Downloads/eos/libraries/chain/include/eosio/chain/contract_table_objects.hpp:204:17: error: use of undeclared identifier 'f64_positive_infinity'
         return f64_positive_infinity();
                ^
/Users/yufei/Downloads/eos/libraries/chain/include/eosio/chain/contract_table_objects.hpp:213:17: error: use of undeclared identifier 'f128_negative_infinity'
         return f128_negative_infinity();
                ^
/Users/yufei/Downloads/eos/libraries/chain/include/eosio/chain/contract_table_objects.hpp:217:17: error: use of undeclared identifier 'f128_positive_infinity'
         return f128_positive_infinity();
                ^
4 errors generated.
make[2]: *** [libraries/chain/CMakeFiles/eosio_chain.dir/controller.cpp.o] Error 1
make[1]: *** [libraries/chain/CMakeFiles/eosio_chain.dir/all] Error 2
make: *** [all] Error 2

    >>>>>>>>>>>>>>>>>>>> MAKE installing EOSIO has exited with the above error.

出现这个错误的原因是忘记重新更新子模块

也就是说,每次 git checkout 新的版本,都要执行以下命令

git submodule update --init --recursive

然后再运行

sudo ./eosio_install.sh -s EOS

这样就编译正常了

    Installing EOSIO Binary Symlinks



     _______  _______  _______ _________ _______
    (  ____ \(  ___  )(  ____ \\__   __/(  ___  )
    | (    \/| (   ) || (    \/   ) (   | (   ) |
    | (__    | |   | || (_____    | |   | |   | |
    |  __)   | |   | |(_____  )   | |   | |   | |
    | (      | |   | |      ) |   | |   | |   | |
    | (____/\| (___) |/\____) |___) (___| (___) |
    (_______/(_______)\_______)\_______/(_______)
    For more information:
    EOSIO website: https://eos.io
    EOSIO Telegram channel @ https://t.me/EOSProject
    EOSIO resources: https://eos.io/resources/
    EOSIO Stack Exchange: https://eosio.stackexchange.com
    EOSIO wiki: https://github.com/EOSIO/eos/wiki

查看最新的版本

nodeos --version
v1.5.0
目前尚无回复
简单教程 = 简单教程,简单编程
简单教程 是一个关于技术和学习的地方
现在注册
已注册用户请 登入
关于   |   FAQ   |   我们的愿景   |   广告投放   |  博客

  简单教程,简单编程 - IT 入门首选站

Copyright © 2013-2022 简单教程 twle.cn All Rights Reserved.