I like to use Xcode to write code for my Arduinos. There is a template I use called embedxcode which makes this pretty easy, but one of the things embedxode does is create a main.cpp file in my Arduino project directory (same location as the .ino file). The problem is if I then go use the Arduino IDE 1.0.5 (In Windows), I get this error when I verify my sketch:
c:/program files (x86)/arduino_106/hardware/tools/avr/bin/…/lib/gcc/avr/4.3.2/…/…/…/…/avr/lib/avr5/crtm328p.o:(.init9+0x0): undefined reference to `main’
Interestingly, if I’m using the Mac version of the Arduino IDE 1.0.5, I don’t get any errors. I also don’t get errors if I use version 1.5.8 in Windows.
Does anyone know any trick I could use to get rid of this error? I know I can rename main.cpp to something else and rename it back before I use Xcode again, but I’d rather find a solution that didn’t require that.