Creating a library of C++ classes for Arduino; How to #include "Arduino.h", "WProgram.h"?
The libraries from Adafruit and elsewhere assume you are using the Arduino IDE. If you choose not to use that you will have difficulties compiling your own code. The header files you ask about are in the IDE download. You can always grab a copy of that and put the appropriate .h files into your "include" search path.


  However, in my io.h file, there is a long list of #if defined (AVR_various_names).


Well, do a test compile using the Arduino IDE, using "verbose compiling" and see what defines are generated for your particular board (which you haven't mentioned). There won't be that many of them. Then you can put that on the build commands for your IDE.


  Or can I avoid all this and somehow create C++ classes independently?


You can create C++ classes inside the Arduino IDE. I don't see how this relates to your other issues.



The Arduino IDE basically generates build commands for avr-g++ - it isn't some horrible beast you should avoid using.