c++ - 'Undefined reference' in Atmel Studio 6.2 -
it's first atmel studio project. i've set ide , made work example code provided new project.
now i'm trying run simple code using pcf8574:
#include <arduino.h> #include <wire.h> #include <pcf8574.h> /* constants */ const int static serial_speed = 57600; /* functions */ void setup(); void loop(); /* variables */ pcf8574 expander = pcf8574(); void setup() { serial.begin(57600); expander.begin(0x20); } void loop() { expander.digitalwrite(1, high); delay(1000); expander.digitalwrite(1, low); delay(1000); }
but keep getting these errors:
undefined reference 'pcf8574::begin(unsigned char)' undefined reference 'pcf8574::digitalwrite(unsigned char, unsigned char)' undefined reference 'pcf8574::pcf8574()'
i've added pcf8574 compiler directory (properties > toolchain > avr c++ compiler > directories) , i'm sure compiler 'sees' .h file - otherwise throw 'no such file or directory' error.
pcf8574 library code: http://nettigo.pl/attachments/196
the same code (copied , pasted) compiled on arduinoide works fine gues it's wrong compiler/linker settings.
has encountered similar problem? don't know else save setup in ide make work fine.
Comments
Post a Comment