Radiohead library error with ATtiny85 but not with Uno

My IDE is Arduino1:1.0.5

I installed the Radiohead libraries RadioHead: RadioHead Packet Radio library for embedded microprocessors to use a 315 Mhz transmitter.

I also have the google code attiny libraries http://code.google.com/p/arduino-tiny/downloads/detail?name=arduino-tiny-0100-0018.zip

The simple transmitter code worked with my Uno (a separate 315 Mhz receiver showed that the signal was received and decoded).

Could someone point me in the right direction to solve this?

// ask_transmitter.pde
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to transmit messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) transmitter with an TX-C1 module

#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile

RH_ASK driver;

void setup()
{
    Serial.begin(9600);	  // Debugging only
    if (!driver.init())
         Serial.println("init failed");
}

void loop()
{
    const char *msg = "hello";

    driver.send((uint8_t *)msg, strlen(msg));
    driver.waitPacketSent();
    delay(200);
}

I am unable to get the transmit code to compile for an ATTINY85. The error message is

/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=attiny85 -DF_CPU=8000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/home/ubuntu/sketchbook/hardware/tiny/cores/tiny -I/home/ubuntu/sketchbook/libraries/RadioHead -I/usr/share/arduino/libraries/SPI /tmp/build300864687942254717.tmp/ask_transmitter.cpp -o /tmp/build300864687942254717.tmp/ask_transmitter.cpp.o
In file included from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/Stream.h:24:0,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/TinyDebugSerial.h:31,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/WProgram.h:18,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/Arduino.h:4,
from /home/ubuntu/sketchbook/libraries/RadioHead/RadioHead.h:413,
from /home/ubuntu/sketchbook/libraries/RadioHead/RHGenericDriver.h:9,
from /home/ubuntu/sketchbook/libraries/RadioHead/RH_ASK.h:9,
from ask_transmitter.pde:7:
/home/ubuntu/sketchbook/hardware/tiny/cores/tiny/Print.h:37:0: warning: “BIN” redefined [enabled by default]
#define BIN 2
^
In file included from /usr/lib/avr/include/avr/iotn85.h:38:0,
from /usr/lib/avr/include/avr/io.h:340,
from /usr/lib/avr/include/avr/interrupt.h:38,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/WProgram.h:8,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/Arduino.h:4,
from /home/ubuntu/sketchbook/libraries/RadioHead/RadioHead.h:413,
from /home/ubuntu/sketchbook/libraries/RadioHead/RHGenericDriver.h:9,
from /home/ubuntu/sketchbook/libraries/RadioHead/RH_ASK.h:9,
from ask_transmitter.pde:7:
/usr/lib/avr/include/avr/iotnx5.h:55:0: note: this is the location of the previous definition
#define BIN 7
^
In file included from ask_transmitter.pde:8:0:
/usr/share/arduino/libraries/SPI/SPI.h: In static member function ‘static byte SPIClass::transfer(byte)’:
/usr/share/arduino/libraries/SPI/SPI.h:56:3: error: ‘SPDR’ was not declared in this scope
SPDR = _data;
^
/usr/share/arduino/libraries/SPI/SPI.h:57:12: error: ‘SPSR’ was not declared in this scope
while (!(SPSR & _BV(SPIF)))
^
In file included from /usr/lib/avr/include/avr/io.h:99:0,
from /usr/lib/avr/include/avr/interrupt.h:38,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/WProgram.h:8,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/Arduino.h:4,
from /home/ubuntu/sketchbook/libraries/RadioHead/RadioHead.h:413,
from /home/ubuntu/sketchbook/libraries/RadioHead/RHGenericDriver.h:9,
from /home/ubuntu/sketchbook/libraries/RadioHead/RH_ASK.h:9,
from ask_transmitter.pde:7:
/usr/share/arduino/libraries/SPI/SPI.h:57:23: error: ‘SPIF’ was not declared in this scope
while (!(SPSR & _BV(SPIF)))
^
In file included from ask_transmitter.pde:8:0:
/usr/share/arduino/libraries/SPI/SPI.h: In static member function ‘static void SPIClass::attachInterrupt()’:
/usr/share/arduino/libraries/SPI/SPI.h:63:3: error: ‘SPCR’ was not declared in this scope
SPCR |= _BV(SPIE);
^
In file included from /usr/lib/avr/include/avr/io.h:99:0,
from /usr/lib/avr/include/avr/interrupt.h:38,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/WProgram.h:8,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/Arduino.h:4,
from /home/ubuntu/sketchbook/libraries/RadioHead/RadioHead.h:413,
from /home/ubuntu/sketchbook/libraries/RadioHead/RHGenericDriver.h:9,
from /home/ubuntu/sketchbook/libraries/RadioHead/RH_ASK.h:9,
from ask_transmitter.pde:7:
/usr/share/arduino/libraries/SPI/SPI.h:63:15: error: ‘SPIE’ was not declared in this scope
SPCR |= _BV(SPIE);
^
In file included from ask_transmitter.pde:8:0:
/usr/share/arduino/libraries/SPI/SPI.h: In static member function ‘static void SPIClass::detachInterrupt()’:
/usr/share/arduino/libraries/SPI/SPI.h:67:3: error: ‘SPCR’ was not declared in this scope
SPCR &= ~_BV(SPIE);
^
In file included from /usr/lib/avr/include/avr/io.h:99:0,
from /usr/lib/avr/include/avr/interrupt.h:38,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/WProgram.h:8,
from /home/ubuntu/sketchbook/hardware/tiny/cores/tiny/Arduino.h:4,
from /home/ubuntu/sketchbook/libraries/RadioHead/RadioHead.h:413,
from /home/ubuntu/sketchbook/libraries/RadioHead/RHGenericDriver.h:9,
from /home/ubuntu/sketchbook/libraries/RadioHead/RH_ASK.h:9,
from ask_transmitter.pde:7:
/usr/share/arduino/libraries/SPI/SPI.h:67:16: error: ‘SPIE’ was not declared in this scope
SPCR &= ~_BV(SPIE);

The ATtiny85 does not have dedicated SPI hardware. You will have to modify the code to use USI or bit-bang.

You can fall back to the previous library:
http://www.airspayce.com/mikem/arduino/VirtualWire/
The VirtualWire is known to work with ATtiny85.