/usr/local/include/eosiolib/types.h:7:10: fatal error: 'stdint.h' file not found on mac
`#include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> using namespace eosio;
class hello : public eosio::contract { public: using contract::contract;
/// @abi action
void hi( account_name user ) {
print( "Hello, ", name{user} );
}
};
EOSIO_ABI( hello, (hi) )`
I have already run sudo make install in build eosiocpp -o hello.wast hello.cpp this gives me error of : /usr/local/include/eosiolib/types.h:7:10: fatal error: 'stdint.h' file not found
@itsmeprasanjit find /usr -name stdint.h -print 2>/dev/null
do you solve this problem?
I got the same problem when I use './eosiocpp -o hello.wast hello.cpp', then I change the command to 'eosiocpp -o hello.wast hello.cpp', success.
+1 same problem
+1 same problem
+1 same problem
I solved it.
In bulid/tools/eosiocpp file, the EOSIO_INSTALL_DIR path is initialized as ~/eos/build.
And the compiler's include path argument is ...
($PRINT_CMDS; /usr/local/wasm/bin/clang -emit-llvm -O3 --std=c++14 --target=wasm32 -nostdinc \
-nostdlib -nostdlibinc -ffreestanding -nostdlib -fno-threadsafe-statics -fno-rtti \
-fno-exceptions -I ${EOSIO_INSTALL_DIR}/include \
-I${EOSIO_INSTALL_DIR}/include/libc++/upstream/include \ // <<----------
-I${EOSIO_INSTALL_DIR}/include/musl/upstream/include \ // <<----------
-I${BOOST_INCLUDE_DIR} \
-I $filePath \
-c $file -o $workdir/built/$name
)
So the actual include path is ~/eos/build/include/libc++/upstream/include, therefore can't find a stdint.h.
I modifed the $EOSIO_INSTALL_DIR as /usr/local in ~/eos/tools/eosiocpp.in, and re-make install my ~/eos/build/tools, then i succeed to compile.
This worked for me. Just remember to change to backticks to quotes in the $EOSIO_INSTALL_DIR value.
@itsmeprasanjit do you still have this issue on latest version of eos? v1.1.0
This worked for me:
cd ~/eos/build
make install
and after that try to build smart contact.
Please try using the eosio.cdt 1.3.2
If you still have the problem and wish to discuss further, please post it in https://eosio.stackexchange.com. To keep things organized, Github issues are intended for bugs reporting and features tracking, and Stack Exchange is the right place for any technical support discussions. Thanks!