I should've seen that coming. New variable CPLUS_INCLUDE_PATH, same value as C_INCLUDE_PATH. (In case you're interested, I'm getting these from
http://gcc.gnu.org/onlinedocs/gcc-4.2.0/gcc/Environment-Variables.html.)
Also, here's a little experiment I thought up that will help me understand a bit better how GCC is working under Vista. If you could try it out and post your results, I'd appreciate it.
1. Remove all GCC/MinGW related environment variables, including any PATH entries.
2. Rename the base folder of your current MinGW installation to something like "testmingw". The idea is to make sure "\MinGW" doesn't exist.
3. Create a new text file called "gcc.bat" which contains the following two lines:
@ECHO OFF
C:\testmingw\bin\gcc.exe %*
where C:\testmingw corresponds to wherever your MinGW installation is.
Save the file somewhere other than in your MinGW folder -- i.e. "C:\testbat\gcc.bat"
4. Add the location of gcc.bat to your PATH environment variable -- i.e. "<other stuff>;C:\testbat"
5. Create a simple test file called "test.cpp" somewhere with the following code:
#include <cstdio>
#include <string>
int main()
{
return 0;
}
6. Open up a command prompt and enter the following commands (assuming you saved test.cpp to C:\anothertestfolder):
C:
cd \anothertestfolder
gcc -v -c test.cpp
Post the output (feel free to use the redirection trick to get something that's easier to copy'n'paste, but use 1> instead of 2> if you do).
Edit:
D'oh. <cstdio>, not <cstdio.h>...