WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: gcc failed with fatal error: stdio.h: no such file or directory  (Read 1871 times)

Offline lovelypp

  • Jr. Member
  • **
  • Posts: 51
gcc failed with fatal error: stdio.h: no such file or directory
« on: September 29, 2020, 10:00:36 PM »
I wirte a simplest test.c:
Code: [Select]
#include <stdio.h>
int main()
{
    printf("hello world!\n");
    return 0;
}
when compile using gcc, it complains with:
fatal error: stdio.h: no such file or directory

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: gcc failed with fatal error: stdio.h: no such file or directory
« Reply #1 on: September 29, 2020, 10:52:37 PM »
Hi lovelypp
Did you install  compiletc.tcz ?

Offline lovelypp

  • Jr. Member
  • **
  • Posts: 51
Re: gcc failed with fatal error: stdio.h: no such file or directory
« Reply #2 on: September 29, 2020, 10:53:43 PM »
@Rich

thanks. After install glibc_base-dev & glibc_add_lib, it solved.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: gcc failed with fatal error: stdio.h: no such file or directory
« Reply #3 on: September 29, 2020, 11:00:15 PM »
Hi lovelypp
Did you install  compiletc.tcz ?
You didn't really answer the question. If you plan on compiling packages you want to install  compiletc.tcz.

Offline lovelypp

  • Jr. Member
  • **
  • Posts: 51
Re: gcc failed with fatal error: stdio.h: no such file or directory
« Reply #4 on: September 29, 2020, 11:26:39 PM »
@Rich
    I tried your method. it's the right solution.

    I commented my gcc,make, cmake,glibc,linux-header tcz,now only one compiletc.tcz needed.
thanks!

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: gcc failed with fatal error: stdio.h: no such file or directory
« Reply #5 on: September 29, 2020, 11:35:33 PM »
Hi lovelypp
You are welcome. :)