0

Undefined reference error Adafruit neopixel
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Undefined reference error Adafruit neopixel

by hellraise007 on Thu Jan 10, 2019 1:18 pm

Hello all,
First of all let me apologise if this is not the correct section to post this.
I'm using the Adafruit_NeoPixel arduino library in a project in Atmel Studio 7. While trying to buil the project I get this error

Code: Select all | TOGGLE FULL SIZE
Severity   Code   Description   Project   File   Line
Error      undefined reference to `Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned int)'   Touch   D:\touch-base\Main\Touch\light.h   11
Error      undefined reference to `Adafruit_NeoPixel::~Adafruit_NeoPixel()'   Touch   D:\touch-base\Main\Touch\light.h   11


Since I am fresh to Atmel Studio and the neopixel library, any help would be appreciated

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_NeoPixel.h>
#define LED_COUNT 8
#define LED_DRIVER_PIN 7
Adafruit_NeoPixel lights = Adafruit_NeoPixel(LED_COUNT, LED_DRIVER_PIN, NEO_RGB + NEO_KHZ800);

{Some code}

hellraise007
 
Posts: 2
Joined: Thu Jan 10, 2019 1:02 pm

Re: Undefined reference error Adafruit neopixel

by oesterle on Thu Jan 10, 2019 3:39 pm

Hi, hellraise007!


As I understand it, Atmel Studio 7 can open Arduino sketches, and import libraries like Adafruit_NeoPixel. Apparently it looks for them in Arduino's libraries folder, which on Windows is in Documents > My Documents > Libraries.

Have you installed the Arduino IDE, and used that to install the Adafruit NeoPixel library? That's what I would try.

But there may be an easier way.


Cheers,

Eric

oesterle
 
Posts: 410
Joined: Tue Sep 17, 2013 11:32 pm

Re: Undefined reference error Adafruit neopixel

by hellraise007 on Thu Jan 10, 2019 11:55 pm

oesterle wrote:Hi, hellraise007!


As I understand it, Atmel Studio 7 can open Arduino sketches, and import libraries like Adafruit_NeoPixel. Apparently it looks for them in Arduino's libraries folder, which on Windows is in Documents > My Documents > Libraries.

Have you installed the Arduino IDE, and used that to install the Adafruit NeoPixel library? That's what I would try.

But there may be an easier way.


Cheers,

Eric


Hello Eric,
Yes I have imported the neopixel libraries from arduino into a separate project (I'm using to host just libraries and common code) in the same solution space. I have added the directories into the compiler options of the working project (which in turn solved another issue of not detecting the header file altogether). Still no outcome.

hellraise007
 
Posts: 2
Joined: Thu Jan 10, 2019 1:02 pm

Please be positive and constructive with your questions and comments.