EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.27k stars 3.6k forks source link

'float.h' file not found when I include <eosio/chain/types.hpp> #4513

Closed thbourlove closed 6 years ago

thbourlove commented 6 years ago
vagrant@ubuntu-xenial:/vagrant$ eosiocpp -o mycontract.wast mycontract.cpp
In file included from mycontract.cpp:5:
In file included from ./mycontract.hpp:8:
In file included from /usr/local/include/eosio/chain/types.hpp:6:
In file included from /usr/local/include/eosio/chain/name.hpp:3:
In file included from /usr/local/include/fc/reflect/reflect.hpp:10:
In file included from /home/vagrant/opt/boost/include/boost/lexical_cast.hpp:32:
In file included from /home/vagrant/opt/boost/include/boost/lexical_cast/try_lexical_convert.hpp:42:
In file included from /home/vagrant/opt/boost/include/boost/lexical_cast/detail/converter_lexical.hpp:54:
In file included from /home/vagrant/opt/boost/include/boost/lexical_cast/detail/converter_lexical_streams.hpp:63:
In file included from /home/vagrant/opt/boost/include/boost/lexical_cast/detail/inf_nan.hpp:34:
In file included from /home/vagrant/opt/boost/include/boost/math/special_functions/sign.hpp:16:
In file included from /home/vagrant/opt/boost/include/boost/math/tools/config.hpp:21:
In file included from /usr/local/include/libc++/upstream/include/cfloat:64:
/usr/local/include/libc++/upstream/include/float.h:69:15: fatal error: 'float.h' file
      not found
#include_next <float.h>
              ^~~~~~~~~
1 error generated.
thbourlove commented 6 years ago

1931 #4350

andriantolie commented 6 years ago

You shouldn't include any eosio/chain/* inside your smart contract, it won't be supported. The right types.hpp for a smart contract is #include <eosio/types.hpp> which is the file inside contracts/eosiolib/types.hpp

ghost commented 6 years ago

I included the file #include <eosio/types.hpp> and i copy the yet is found the same error in 'float.h' file not found #include_next

JohnnyZhao commented 6 years ago

same issue here.

using docker build using Docker/dev/Dockerfile v1.2.3, got this error when I try to include:

#include <fc/variant_object.hpp>

the image I use: eoslaomao/eos-dev:1.2.3

any ideas?