Trying to compile arduino code using pure avr-g++, keep getting an error that says Serial is an undefined reference : arduino


I’ve been trying all day to get my code to compile using avr-g++. I’ve gotten everything to compile except for code that include Serial. I’ve added all of the necessary cpp files (CDC.cpp is where Serial is defined) but it still gives me the error saying that none of the Serial functions are defined. I think it has something to do with the way the compiler processes extern. I just don’t get why it works in the IDE but not on the command line. Does anyone have any experience?


Please enter your comment!
Please enter your name here