<p>I am trying to use MinGW to compile a C program under Windows XP. The gcc.exe gives the following error:</p>

<p><strong>stdio.h : No such file or directory</strong></p>

<p>The code (hello.c) looks like this:</p>

<pre><code>#include &lt; stdio.h &gt;

void main()
{
    printf("\nHello World\n");
}
</code></pre>

<p>I use a batch file to call gcc. The batch file looks like this:</p>

<pre><code>@echo off
set OLDPATH=%PATH%
set path=C:\devtools\MinGW\bin;%PATH%
set LIBRARY_PATH=C:\devtools\MinGW\lib
set C_INCLUDE_PATH=C:\devtools\MinGW\include

gcc.exe hello.c 

set path=%OLDPATH%
</code></pre>

<p>I have tried the option <strong>-I</strong> without effect. What do I do wrong?</p>

[{'answer_id': 81731, 'author': 'Leigh Caldwell', 'author_id': 3267, 'author_profile': 'https://Stackoverflow.com/users/3267', 'pm_score': 4, 'selected': True, 'text': '<p>Try changing the first line to:</p>\n\n<pre><code>#include &lt;stdio.h&gt;\n</code></pre>\n\n<p>without the spaces. It is trying to look for a file called " stdio.h " with a space at the beginning and end.</p>\n'}, {'answer_id': 81736, 'author': 'PierreBdR', 'author_id': 7136, 'author_profile': 'https://Stackoverflow.com/users/7136', 'pm_score': 2, 'selected': False, 'text': '<p>You should try to install MinGW in the default install directory (i.e. C:\\MinGW) I read many times it was recommended to avoid problems. There may be a (wrongly) hardcoded path in gcc.</p>\n'}, {'answer_id': 89036, 'author': 'aib', 'author_id': 1088, 'author_profile': 'https://Stackoverflow.com/users/1088', 'pm_score': 0, 'selected': False, 'text': '<p>Also note that main() should return an int:</p>\n\n<pre><code>int main(void)\n</code></pre>\n'}, {'answer_id': 21968019, 'author': 'kaka', 'author_id': 1934048, 'author_profile': 'https://Stackoverflow.com/users/1934048', 'pm_score': -1, 'selected': False, 'text': '<p>You can use</p>\n\n<p>$ sudo apt-get install build-essential</p>\n\n<p>to solve this problem</p>\n'}]
['https://Stackoverflow.com/questions/81716', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3565/']