Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

'stdint.h' file not found when running the example of smart contract “Hello World” #1718

Closed
Duffyxx opened this issue Mar 21, 2018 · 12 comments

Comments

@Duffyxx
Copy link

Duffyxx commented Mar 21, 2018

I follow the tutorials to run the example of "Hellow World",when I run this command:

./eosiocpp -o hello.wast hello.cpp

get the error:

In file included from hello.cpp:5:
In file included from ./hello.hpp:5:
In file included from /usr/local/include/eosiolib/eosio.hpp:6:
In file included from /usr/local/include/eosiolib/types.hpp:6:
/usr/local/include/eosiolib/types.h:7:10: fatal error: 'stdint.h' file not found
#include <stdint.h>
^~~~~~~~~~
1 error generated.

My system is 10.13.1 (17B1003).
I have checked this file in clang and g++, stdint.h can be found, I don't know how to do with it.
Can somebody help me?
Thanks.

@Duffyxx
Copy link
Author

Duffyxx commented Mar 21, 2018

I changed the file /usr/local/include/eosiolib/types.h
#include<stdint.h> to #include</usr/include/stdint.h>
is ok ,and get the error:
'sys/cdefs.h' file not found
so, I have to change "sys/cdefs.h" to "/usr/include/sys/cdefs.h".
So, why eoscpp can't find files in /usr/include/?

@yanxi123-com
Copy link

+1

1 similar comment
@brain-hu
Copy link

brain-hu commented Apr 3, 2018

+1

@brain-hu
Copy link

brain-hu commented Apr 3, 2018

Solved.
cd ~/eos/build
sudo make install
cd ~/eos/contract/currency
eosiocpp -o currency.wast currency.cpp

@itsmeprasanjit
Copy link

sudo make install is not solving the error in my case :(
usr/local/include/eosiolib/types.h:7:10: fatal error: 'stdint.h' file not found

@mylesshie
Copy link

+1

@tempest2023
Copy link

I don't make eos by myself. I think that's why this error happens.
So Is there any way to solve this without making eos?

@qs-lll
Copy link

qs-lll commented May 17, 2018

+1

4 similar comments
@luoxiaohui
Copy link

+1

@sikeeoh
Copy link

sikeeoh commented May 26, 2018

+1

@shalakhin
Copy link

+1

@yekai1003
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests