exit status 1 'A0' was not declared in this scope

Another possibility is code in a .cpp file that isn't including Arduino.h

Yeah, I suspect that from this:

C:\Program Files (x86)\Arduino\libraries\EmonLib/EmonLib.h:95:5: error: 'boolean' does not name a type

Because boolean is a typedef from the Arduino core. Which is why it's important to include links to the library dependencies. I shouldn't have to go hunt around for this EmonLib and hope I find the same version that Samadi happens to be using.