This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 7.2.0 failed with cstdlib:75:15: fatal error: stdlib.h: No such file or directory on a hello-world program
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Tim <tolez_xuninada at hotmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>, Xi Ruoyao <ryxi at stu dot xidian dot edu dot cn>
- Date: Tue, 13 Feb 2018 17:40:34 +0000
- Subject: Re: gcc 7.2.0 failed with cstdlib:75:15: fatal error: stdlib.h: No such file or directory on a hello-world program
- Authentication-results: sourceware.org; auth=none
- References: <1518502400085-0.post@n8.nabble.com> <1518514238.18388.2.camel@stu.xidian.edu.cn>
On 13 February 2018 at 09:30, Xi Ruoyao wrote:
> I think `--with-native-system-header-dir=/home/linuxbrew/.linuxbrew/include`
> causes the problem.
Yes probably. stdlib.h doesn't come from GCC, but it must have been
present when GCC was built.
You need to ensure you have C library headers present, that's not
GCC's responsibility, it's yours.