Arduino code compiles both on Eclipse and on AVR Studio 5, but only Eclipse version is functional
AVR Studio uses the atmel compiler (IAR). What compiler does Eclipse use (I'm guessing gcc). There are differences in the extensions and in the standard libraries for different compilers.