Problem with EEPROM and ATMega328

Hello all,

This forum has been much help, but I was unable to find an answer to my problem and serendipitously found the solution I am posting below.

I was having problems compiling my code with the EEPROM library:

hardware/libraries/EEPROM/EEPROM.o: In function `EEPROMClass::write(int, unsigned char)':

/usr/lib/gcc/avr/4.2.2/../../../../avr/include/avr/eeprom.h:293: undefined reference to `__eeprom_read_byte_1F2021'

Couldn't determine program size: avr-size: '/tmp/build44047.tmp/http_server_04.hex': No such file

Thinking it might be my code, I loaded one of the EEPROM example sketches and it still did not compile. I updated gcc-avr and avr-libc and still got the error with the exact same path even though 4.2.2 was gone and replaced by 4..3.2. In my frustration, I switched the target board to the Duemilanove with an ATMega168 and the example code compiled fine. Later (after much bad language) I switched the board back to the 328 and the example code compiled fine! I hope this helps some people with a similar problem.