T
T
Telefon2018-05-30 21:02:40
C++ / C#
Telefon, 2018-05-30 21:02:40

How to fix "stdio.h: No such file or directory" error?

When compiling, it gives an error:
helloworld.c:1:19: fatal error: stdio.h: No such file or directory
#include

#include <stdio.h>

int main()
{
    printf("This is a native C program.\n");
    return 0;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2018-05-30
@jcmvbkbc

How to fix "stdio.h: No such file or directory" error?

Understand why it occurs:
- run compilation with the -v option: gcc -v helloworld.c -o helloworld
- find the line in the output
#include "..." search starts here:
#include <...> search starts here:

- see what directories come after them, if these directories exist on your system
- see if your system has stdio.h, and if so, where
- write here the results of the previous steps.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question