I had the same issue as you were having, would get the error when compiling, but have it working now on an Arduino Leonardo (atmega32u4).
To compile, I tried the previous version of WinAVR, which worked and gave me a hex file. But to program it I needed the latest version that has support for...