Arduino on Xcode Project — Official Thread

Hi!

Here are two working :slight_smile: projects

  • Arduino-1: very basic

  • Arduino-3: with a class for the LED

and one non-working :frowning: project

  • Arduino-4: the LED class is on a library

I'm sure it's something trivial :~ but I can't find it.

/usr/local/CrossPack-AVR/bin//avr-gcc -mmcu=atmega328p  -I. -gstabs  -DF_CPU=16000000L -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino -Os -Wall -Wstrict-prototypes  -std=gnu99  -o main.elf main.cpp -L. core.a -lm
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++
/var/folders/gA/gAXpDd7ZEBG06Owk-4lV4++++TI/-Tmp-//cc1xTugb.o: In function `global constructors keyed to myLed':
main.cpp:9: undefined reference to `LED::LED()'
/var/folders/gA/gAXpDd7ZEBG06Owk-4lV4++++TI/-Tmp-//cc1xTugb.o: In function `loop':
main.cpp:31: undefined reference to `LED::blink(int, int)'
/var/folders/gA/gAXpDd7ZEBG06Owk-4lV4++++TI/-Tmp-//cc1xTugb.o: In function `setup':
main.cpp:18: undefined reference to `LED::begin(int)'
main.cpp:24: undefined reference to `LED::on()'
make: *** [main.elf] Error 1

Warning! Before compiling, always launch Build > Clean or Shift-Command-K.

Any idea? Thank you for your help!

Arduino-1.zip (40 KB)

Arduino-3.zip (23.9 KB)

Arduino-4.zip (26.2 KB)