arduino-1.6.12 w/ESP8266 problem finding include file

Getting error compiling basic 'Blink' sketch:

c:\documents and settings\owner\local settings\application data\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\allocator.h:46:75: fatal error: bits/c++allocator.h: No such file or directory

But that file (allocator.h) exists at that exact location!

Ok, got it fixed!

You know how Arduino puts vital information here:
C:\Documents and Settings\owner\Local Settings\Application Data\Arduino15

It also puts the ESP... stuff there as well.

Well, by creating this directory:
D:\arduino-1.6.12\Portable

the IDE will magically put all that vital information there, including all the ESP8266 libraries & stuff

Then, the compiler no longer chokes.

You're reading the error message wrong. You need to look at the full errror, not just the fragment you posted. The missing file is bits/c++allocator.h, which is included at line 46 of allocator.h. c++allocator.h does exist on my system. You should be able to find it at:
c:\documents and settings\owner\local settings\application data\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\xtensa-lx106-elf\bits
Maybe that folder isn't part of the include path?

It's strange that your arduino15 folder is not standard. For example, mine is at C:\Users\per\AppData\Local\Arduino15. That is the usual location with Arduino 1.6.6 and newer on Windows. Note that your folder name is arduino15, not Arduino15, not that it should matter on Windows. Do you know why it's different on your system?

Daenerys:
Ok, got it fixed!

Glad to hear. I already had the above typed in when you posted the second message so I'll go ahead and post it anyways.

It's strange that your arduino15 folder is not standard. For example, mine is at
C:\Users\per\AppData\Local\Arduino15.

That is for Windows 10.

Under Windows XP, it goes here:
C:\Documents and Settings\owner\Local Settings\Application Data\Arduino15

I suspect the spaces messes up things. Not 100% sure, but that is what I suspect.

But now everything works ok. New location has no spaces:

D:\arduino-1.6.12\Portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits

I had to copy my bits folder.