Undefined reference error Adafruit neopixel

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
hellraise007
 
Posts: 5
Joined: Thu Jan 10, 2019 1:02 pm

Undefined reference error Adafruit neopixel

Post by hellraise007 »

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

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

#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}

User avatar
oesterle
 
Posts: 806
Joined: Tue Sep 17, 2013 11:32 pm

Re: Undefined reference error Adafruit neopixel

Post by oesterle »

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

User avatar
hellraise007
 
Posts: 5
Joined: Thu Jan 10, 2019 1:02 pm

Re: Undefined reference error Adafruit neopixel

Post by hellraise007 »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”