After a day of tinkering and studying I've finally gotten most things to compile using only the command line avr-g++. However, no matter what I do I can't seem to get code using Serial to compile. No matter what I do, whether I precompile .o files and link later, or whether I compile the code directly, I always get this message:
C:\Users\Ryan\AppData\Local\Temp\cc07l64G.o: In function `setup':
test.cpp:(.text+0xa): undefined reference to `Serial'
test.cpp:(.text+0xc): undefined reference to `Serial'
test.cpp:(.text+0xe): undefined reference to `HardwareSerial::begin(unsigned long, unsigned char)'
C:\Users\Ryan\AppData\Local\Temp\cc07l64G.o: In function `loop':
test.cpp:(.text+0x1a): undefined reference to `Serial'
test.cpp:(.text+0x1c): undefined reference to `Serial'
test.cpp:(.text+0x1e): undefined reference to `Print::write(unsigned char const*, unsigned int)'
collect2.exe: error: ld returned 1 exit status
I know this probably has something to do with Serial being declared as an extern Serial_ in USBApi.h, but I don't know how to fix it. Can anyone help???