04 Jan 2012, 16:28
first of all thank’s a lot for your very useful book ‘Arduino’. Now I’m looking forward to write my code a little bit more methodically! The Telegraph example works well when I use the Arduino 0022 release but with the last one the following error message occurs:
core.a(main.cpp.o): In function `main’:
/Applications/Arduino_23.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:11: undefined reference to `setup’
/Applications/Arduino_23.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:14: undefined reference to `loop’
Before compilation I replaced WProgram.h with Arduino.h as you recommended. In the main.cpp the Arduino.h file is included too and in the Arduino.h, setup() and loop() are declared.
What’s going wrong ?
Kind regards, Henri
04 Jan 2012, 17:25
I see the same error message when I compile the Telegraph.pde sketch directly. I do not know why that happens and I’ll have a look at it.
But it’s not a big problem, because when you copy the Telegraph files to Arduino’s libraries folder (as described in the book) then everything works fine.
Because of the stricter warning level of Arduino 1.0 you’ll see a couple of warnings. You can eliminate most of them by replacing
char* LETTERS and
char* DIGITS with
const char* LETTERS and
const char* <a href="mailto:LETTERS”>LETTERS@. Also you have to use unsigned values for loop counters, that is, use
for (unsigned int i ... instead of
for (int i <a href="mailto:...”>...@.
You must be logged in to comment