Hi!
Now, I tried the same program but using libraries. And it fails
Here's the error report from Xcode:
/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
After some research, it seems to be related to the link options.
The library LED.h LED.cpp doesn't figure on the compile line:
/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
Please refer to enclosed Makefile and full build log report files
What are the parameters to be changed on the Makefile, not only for this specific project for any future projects?
Thank you for your help