I have verbose outup ON still...
When I open NEW project and insert into this new code test3.pde from bperrybap - I still get error when I select Arduino MEGA8 board...
So what can I test now? I use arduino 1.0.2 .... I go to test it in newer 1.0.3 IDE... But I think it is some IDE bug :-(
I explained how it works. (I don't like how it works either)
The IDE looks for certain include files or objects to be referenced. If it sees those, the IDE
includes the library associated with those header files or objects in the build.
The IDE analyzer is too simplistic and does not understand conditional compilation.
When you really do comment out the includes in your sample code yes it does compile even for Atmega 8.
I commented out include for SoftSerial and it compiles just fine.
The file I used with the commented out include is attached.
The reason it works when you changed the name of the include is that the IDE is no longer
recognizing that header as part of the SoftSerial library and so it is no longer trying to pull in
the SoftSerial library.
Again, the issue is the IDE and it's simplistic internal preprocessor that looks for
Arduino libraries and objects in an attempt to fix up the user sketch code.
If it recognizes what it considers to be Arduino headers or objects related to Arduino libraries,
it will build and link against the associated library.
It does not understand conditional compilation and that is where you are having issues.
The way the IDE works today, you can not use a conditional to selectively include an arduino library.
The IDE will trigger on seeing the library header or object regardless of whether it is inside
a disabled conditional.
--- bill