WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: gcc failed with fatal error: stdio.h: no such file or directory  (Read 1792 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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11514
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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11514
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!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11514
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. :)