Added <file>.cpp and <file>.h to project to implement MVC architecture which in turn uses the RTClib and Wire libraries. The problem is that the Arduino library references do not resove correctly when compiling with the debug option. The same problem occurs when the files are either in the immediate local directory with the controller *.ino file or when they are moved to their own respective library location in the Arduino library hierarchy.
The error:
Compiling debug version of 'TimeTest2' for 'Arduino Uno'
ChickCoopCtl.cpp.o : : In function `ChickCoopCtl::getTime(char*, char*)':
ChickCoopCtl.cpp : now()'
ChickCoopCtl.cpp : now()'
ChickCoopCtl.cpp.o : : In function `ChickCoopCtl':
ChickCoopCtl.cpp : undefined reference to `Wire'
ChickCoopCtl.cpp : undefined reference to `Wire'
ChickCoopCtl.cpp : begin()'
ChickCoopCtl.cpp : begin()'
avr-objcopy* : : : No such file
avr-objcopy* : : : No such file
The first compiler pass succeeds but the link level fails. This same code compiles and loads successfully if the debug option is set to release. I have changed the references to wire to the underlying TwoWire class and instansiated RTC_DS1307 rather than use the static class reference to no avail - both versions work in release but above errors in debug.