Thanks for that. This worked for MESS, but not MAME though. I'm also using a clean build for both MESS and MAME.

Linking MAME64.exe...
obj/windows64/mame/dataeast.a(deco222.o):deco222.c:(.data$_ZTV15deco_222_device[
vtable for deco_222_device]+0x250): undefined reference to `non-virtual thunk to
m6502_device::memory_space_config(address_spacenum) const'
obj/windows64/mame/dataeast.a(deco222.o):deco222.c:(.data$_ZTV15deco_222_device[
vtable for deco_222_device]+0x2f8): undefined reference to `non-virtual thunk to
m6502_device::state_import(device_state_entry const&)'
c:/mingw64-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mi
ngw32/bin/ld.exe: obj/windows64/mame/dataeast.a(deco222.o): bad reloc address 0x
2f8 in section `.data$_ZTV15deco_222_device[vtable for deco_222_device]'
c:/mingw64-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mi
ngw32/bin/ld.exe: final link failed: Invalid operation
collect2: ld returned 1 exit status
make: *** [MAME64.exe] Error 1