diI've got an AVRUSB-based project (now V-USB, but I'm still using an old codebase before converting it to the new library) which works fine on both my 168 and my 328 using 0016, but simply will not work with 0018.
The first part of the problem is just that one file was .c but should be compiled as .cpp, so I renamed it (easy enough). The library now compiles in 0018... but the code does not work correctly.
The original library had to be precompiled for 0016 using the command line
avr-g++ -Wall -Os -I. -DUSB_CFG_CLOCK_KHZ=16000 -mmcu=atmega168 -c usbdrvasm.S -c usbdrv.c
The important parts are the define for the frequency, and the -mmcu switch, I think. I have tried editing the header files to force the definition of the frequency, and now 0018 compiles and the device almost works on my 168 (in that my USB device is recognized by the system... but does not function correctly), but on my 328, the generated USB device is not even recognized at all! Looking at the obdev forums, they suggest compiling as if for the 168 and just using it that way... but that doesn't work so much in 0018, where I can't figure out how to specify how the libraries should be compiled.
Obviously this is not desired. Any suggestions? I can continue to use 0016, but I would like it to work with newer versions of the Arduino environment, and I can't see why it wouldn't--aside from which anyone who downloads the code is probably going to want to use the most recent version of the environment...